We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4ba276 commit 88863a4Copy full SHA for 88863a4
src/Servers/Server.php
@@ -152,7 +152,8 @@ private function getQuery(): ?string
152
{
153
// check if query is sent as raw http body in request as "application/json" or via post fields as "multipart/form-data"
154
$headers = apache_request_headers();
155
- if (array_key_exists("Content-Type", $headers) and $headers["Content-Type"] === "application/json") {
+ if (array_key_exists("Content-Type", $headers)
156
+ and in_array($headers["Content-Type"], ["application/json", "application/json;charset=utf-8"])) {
157
// raw json string in http body
158
$phpInput = json_decode(file_get_contents("php://input"), true);
159
return $phpInput["query"] ?? null;
0 commit comments