Better support SSL through proxified server

Add support for HTTP header HTTP_X_FORWARDED_PROTO with https mode.

On NGINX frontend also needed to add to server part:

proxy_set_header        X-Forwarded-Proto $scheme;
add_header              Front-End-Https   on;