Update index.php

This commit is contained in:
Namhyeon Go 2024-11-23 21:59:44 +09:00
parent 0c0cbd5247
commit 8803fb7f05

View File

@ -428,11 +428,11 @@ function relay_fetch_url($params) {
}
// check it is POST request
if ($method == "POST") {
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
if ($data == "POST") {
curl_setopt($ch, CURLOPT_POSTFIELDS, array($data));
curl_setopt($ch, CURLOPT_POST, true);
}
// make cURL instance
$response = curl_exec($ch);
$error_code = curl_errno($ch);
@ -666,4 +666,4 @@ if ($context['jsonrpc'] == "2.0") {
"status" => 403,
"message" => "Unsupported format"
), "");
}
}