From 4e53750234d7fbd1f79ac1268afd4cb45f088f9b Mon Sep 17 00:00:00 2001 From: Yves Maerschalck Date: Fri, 1 Jun 2018 09:20:09 +0200 Subject: [PATCH] change SERVER_NAME with HTTP_HOST to get correct URL --- src/OAuth/OAuthRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OAuth/OAuthRequest.php b/src/OAuth/OAuthRequest.php index b7498f8..6e13262 100644 --- a/src/OAuth/OAuthRequest.php +++ b/src/OAuth/OAuthRequest.php @@ -39,7 +39,7 @@ public static function from_request($http_method = null, $http_url = null, $para ? 'http' : 'https'; $http_url = ($http_url) ? $http_url : $scheme . - '://' . $_SERVER['SERVER_NAME'] . + '://' . $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];