Permalink
Browse files

Merge pull request #50 from evanadelman/master

SSL detection breaks in NGINX
  • Loading branch information...
oyvindkinsey committed Dec 11, 2012
2 parents 1899bf9 + 2041c94 commit aecd4bfba0b5bd8e237269732cea7da2f8f1a34c
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/base_facebook.php
View
@@ -1148,10 +1148,16 @@ protected function getHttpProtocol() {
}
return 'http';
}
/*apache + variants specific way of checking for https*/
if (isset($_SERVER['HTTPS']) &&
($_SERVER['HTTPS'] === 'on' || $_SERVER['HTTPS'] == 1)) {
return 'https';
}
/*nginx way of checking for https*/
if (isset($_SERVER['SERVER_PORT']) &&
($_SERVER['SERVER_PORT'] === '443')) {
return 'https';
}
return 'http';
}

0 comments on commit aecd4bf

Please sign in to comment.