mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* check X-Forwarded-Proto for https
This commit is contained in:
parent
cf39163d7b
commit
778a4e5fa8
1 changed files with 4 additions and 3 deletions
|
|
@ -376,12 +376,13 @@ function is_https(): bool
|
|||
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') {
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
TODO: Check for X-Forwarded-Proto==https or X-Forwarded-For==https ?
|
||||
*/
|
||||
if (defined('MTT_USE_HTTPS') && MTT_USE_HTTPS) {
|
||||
return true;
|
||||
}
|
||||
// This HTTP header can be overriden by user agent!
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue