fixing SCRIPT_NAME/url_scheme when behind reverse proxy