﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	parents
5546	Server hardly hostable behind nginx proxy_pass and https	microjoe		"I am currently hosting my GMG instance behind a nginx proxy using the following line:
{{{
proxy_pass http://localhost:6543;
}}}

Since the fastcgi configuration is totally not working (flup errors) this is currently the only way I have to host my GMG. It is behind a secured nginx server with letsencrypt support. However API URLs are returning http://localhost:6543/api/... urls because GMG does not know it is behind a proxy.

I managed to make everything work with the following nginx config:

{{{
location /
{
    proxy_pass http://127.0.0.1:6543;
    proxy_set_header Host       $host;
}
}}}

And this modification in app.py in order to enforce https:


{{{
request.environ['wsgi.url_scheme'] = 'https'
}}}

However this is hacky. I am not familiar enough with wsgi stuff to propose a patch but hosting via proxy should be way simpler than this hacking. Maybe propose new configuration parameters such as ENFORCE_HTTPS or stuff."	defect	closed	major		programming	wontfix			
