added appropriate https env variable if HTTP_X_FORWARDED_PROTO is set to https
Fixes #5