Update patch to use passed HTTP_X_FORWARDED_PROTO as this is populated i...

...n some servers with http.