I have a flask application running on a server (192.168.1.1:8080) located behind a reverse proxy. Let's say, the url https://foo.bar.com/myapp point to my flask app, i.e. to 192.168.1.1:8080.
I am in trouble with the url_for flask function, as it returns something like http://192.168.1.1:8080/blabla (giving blabla as parameter).
How to proceed so that url_for returns https://foo.bar.com/myapp/blabla instead ?
In fact, my application uses a CAS authentication system. So that the ticket gets validate by the CAS server, I need to provide an URL of the shape https://foo.bar.com/....
Any help would be appreciate.