-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAuth callback, https and reverse proxy #819
Comments
Hi, Is your reverse proxy setting the HTTP header: X-Forwarded-Proto https? |
@dpgaspar it does indeed. The reverse proxy is traefik, and when proxying to a simple whoami service, this is the output:
|
Sorry for the delay, FAB is doing this:
so url_for is not sending https behind the proxy, this is a Flask config thing. |
Zell actually, it seems ProxyFix is delivered with Flask, so it is already the case I suppose in a way… should I close this issue? |
@victornoel I think what we should do is just document the ProxyFix solution. It is trivial to setup: just add |
I would say this problem is "solved". |
@dpgaspar it is already documented in http://flask.pocoo.org/docs/1.0/deploying/wsgi-standalone/#proxy-setups In the end, I don't think it was really an issue related to FAB. |
@dpgaspar actually, this doesn't seem to work: airflow has its own way of enabling the proxy fix, but this doesn't seem to have an impact on the aforementioned problem. I will report the bug at flask instead since it seems to be related to |
@dpgaspar my bad, the |
I'm using an application relying on flask-appbuilder (aiflow) and it is deployed behind a reverse proxy which takes care of https.
For a reason I don't understand, the callback sent to the oauth server (google in this case) is not using the https scheme even though it uses the correct dns name.
I suppose there is some kind of hardcoded way of determining the scheme used.
Either this is a bug (https should have been detected) or this should at least be configurable via the
OAUTH_PROVIDERS
setting.Please tell me if I'm mistaken and this should be reported directly to flask-oauthlib.
The text was updated successfully, but these errors were encountered: