From 507f6019ec3b3cc3fe2b1fdd6b463d76c269dbcd Mon Sep 17 00:00:00 2001 From: Waitman Gobble Date: Sat, 26 Mar 2016 08:30:36 -0700 Subject: [PATCH] SERVER_NAME is not reliable, HTTP_HOST instead. SERVER_NAME doesn't match HTTP_HOST --- extlib/OAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extlib/OAuth.php b/extlib/OAuth.php index 2e9142ab65..019f97201f 100644 --- a/extlib/OAuth.php +++ b/extlib/OAuth.php @@ -261,7 +261,7 @@ public static function from_request($http_method=NULL, $http_url=NULL, $paramete ? 'http' : 'https'; $http_url = ($http_url) ? $http_url : $scheme . - '://' . $_SERVER['SERVER_NAME'] . + '://' . $_SERVER['HTTP_HOST'] . //SERVER_NAME isn't always correct, should be HTTP_HOST ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];