I am trying to use flask-user in a Heroku App behind a chisel proxy.
When opening the website it redirects me to localhost:<port>/user/sign-in?next=/ instead of <app-url>/user/sign-in?next=/.
I tried to set flask's app.config['SERVER_NAME'] to the correct URL but then I get a 404 Not Found error. I guess this is because gunicorn only talks to the proxy so it thinks that the SERVER_NAME must be 127.0.0.1: or something like that.
What would be the correct way of configuring flask-user for this scenario?
I solved this by using nginx as the proxy and then gunicorn and chisel behind that.
The Chisel proxy is too simple and apparently is not able to provide the correct HTTP headers to make this work.
I am trying to use flask-user in a Heroku App behind a chisel proxy. When opening the website it redirects me to or something like that.
What would be the correct way of configuring flask-user for this scenario?
localhost:<port>/user/sign-in?next=/
instead of<app-url>/user/sign-in?next=/
. I tried to set flask'sapp.config['SERVER_NAME']
to the correct URL but then I get a404 Not Found
error. I guess this is because gunicorn only talks to the proxy so it thinks that the SERVER_NAME must be 127.0.0.1: