Reverse proxy error fix

Fix for issue #281
Added missing check for `$_SERVER['HTTP_X_FORWARDED_PROTO']` existence