Merge pull request #71 from skipperbent/development

Added support for x-forwarded-proto http header
This commit is contained in:
Simon Sessingø
2016-03-14 01:08:25 +01:00
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -44,6 +44,9 @@ class Request {
}
public function getIsSecure() {
if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https') {
return true;
}
return isset($_SERVER['HTTPS']) ? true : (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] === 443);
}