Created
March 18, 2014 19:56
-
-
Save drogers98/9628120 to your computer and use it in GitHub Desktop.
nginx drupal oAuth module patch to settings.php. Lets oAuth run on Pantheon, yeay! Thanks to chustedde, https://drupal.org/comment/8475539#comment-8475539
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modify server variables to be compatible with the OAuth.php library | |
$_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST']; | |
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") { | |
$_SERVER['SERVER_PORT'] = 443; | |
} | |
else { | |
$_SERVER['SERVER_PORT'] = 80; | |
} | |
$_SERVER['QUERY_STRING'] = preg_replace("/&{0,1}q=[^&]*&{0,1}/i", "", $_SERVER['QUERY_STRING']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment