Reverse proxy error fix

Added missing check for `$_SERVER['HTTP_X_FORWARDED_PROTO']` existence