summaryrefslogtreecommitdiff
path: root/oauth/callback/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'oauth/callback/index.php')
-rw-r--r--oauth/callback/index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/oauth/callback/index.php b/oauth/callback/index.php
index bbb3322..bb3f57f 100644
--- a/oauth/callback/index.php
+++ b/oauth/callback/index.php
@@ -19,7 +19,7 @@ curl_setopt($crl, CURLOPT_HTTPHEADER, [
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json"
]);
-curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode(($_SERVER['SERVER_PORT'] === "8043" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback") . "&code=" . $_GET['code']);
+curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode(($_SERVER['HTTP_HOST'] === "mist-testing.equestria.horse" ? "https://mist-testing.equestria.horse" : "https://mist.equestria.horse") . "/oauth/callback") . "&code=" . $_GET['code']);
$result = curl_exec($crl);
$result = json_decode($result, true);