Error on isset for X_FORWARDED_PROTO

Should be `isset($_SERVER["HTTP_X_FORWARDED_PROTO"])` and not `!isset($_SERVER["HTTP_X_FORWARDED_PROTO"])`

Avoid a notice : 

`PHP Notice:  Undefined index: HTTP_X_FORWARDED_PROTO in /usr/share/alternc/panel/class/config.php on line 170`
This commit is contained in:
kent1 2017-08-06 23:31:22 +02:00 committed by GitHub
parent c8b3d1af2a
commit 5421c05aae
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ $err = new m_err();
$authip = new m_authip();
$hooks = new m_hooks();
if (!isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"]=="https") {
if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"]=="https") {
$_SERVER["HTTPS"]="on";
}