mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 23:32:17 +00:00
Added support for x-forwarded-proto http header
This commit is contained in:
@@ -44,6 +44,9 @@ class Request {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getIsSecure() {
|
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);
|
return isset($_SERVER['HTTPS']) ? true : (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] === 443);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user