retrieving http protocol from x-forwarded-proto header, as req.protocol ...

...would always be http when we are using the reverse proxy