Skip to content

Commit c1d3484

Browse files
committed
Get request body from php://input if Content-type _contains_ the application/json string.
1 parent 8949942 commit c1d3484

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ProcessGraphQL.module

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class ProcessGraphQL extends Process implements Module {
138138
// instantiating Processor and setting the schema
139139
$processor = new Processor(new Schema());
140140

141-
if (isset($_SERVER['CONTENT_TYPE']) && $_SERVER['CONTENT_TYPE'] === 'application/json') {
141+
if (isset($_SERVER['CONTENT_TYPE']) && strpos($_SERVER['CONTENT_TYPE'], 'application/json') !== false) {
142142
$rawBody = file_get_contents('php://input');
143143
$requestData = json_decode($rawBody ?: '', true);
144144
} else {

0 commit comments

Comments
 (0)