Skip to content
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

[AIRFLOW-1163] Add support for x-forwarded-* headers #3580

Closed
wants to merge 1 commit into from

Conversation

c4milo
Copy link
Contributor

@c4milo c4milo commented Jul 6, 2018

When running Airflow behind a L7 proxy that sends x-fowarded-* headers, the Flask app misconstructs redirect URIs by changing the protocol scheme from https to http. This is not ideal and breaks when SSL is offloaded by such proxy and disabled from airflow.

Tests

I tested it manually getting into my running airflow container and inserting the two lines.

When running Airflow behind a L7 proxy that sends
x-fowarded-* headers, the Flask app miscontructs redirect URIs.
@codecov-io
Copy link

Codecov Report

Merging #3580 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3580      +/-   ##
==========================================
+ Coverage   76.83%   76.83%   +<.01%     
==========================================
  Files         204      204              
  Lines       15488    15492       +4     
==========================================
+ Hits        11900    11904       +4     
  Misses       3588     3588
Impacted Files Coverage Δ
airflow/www_rbac/app.py 100% <100%> (ø) ⬆️
airflow/www/app.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e38a4e5...c7986f4. Read the comment docs.

@Fokko
Copy link
Contributor

Fokko commented Jul 6, 2018

@asfgit asfgit closed this in a8dd6d8 Jul 6, 2018
lxneng pushed a commit to lxneng/incubator-airflow that referenced this pull request Aug 10, 2018
When running Airflow behind a L7 proxy that sends
x-fowarded-* headers, the Flask app miscontructs
redirect URIs.

Closes apache#3580 from c4milo/master
@drewblas
Copy link

drewblas commented Oct 1, 2018

Is there any info or context here on why this was closed without being merged?

@c4milo
Copy link
Contributor Author

c4milo commented Oct 1, 2018

@drewblas, I believe this was merged using Git's CLI.

@ashb
Copy link
Member

ashb commented Oct 2, 2018

Yeah, not merged in a way GitHub could see It (at the time we couldn't merge directly to Github) but a8dd6d8 was the same commit on master.

ashb pushed a commit that referenced this pull request Nov 6, 2018
When running Airflow behind a L7 proxy that sends
x-fowarded-* headers, the Flask app miscontructs
redirect URIs.

Closes #3580 from c4milo/master
galak75 pushed a commit to VilledeMontreal/incubator-airflow that referenced this pull request Nov 23, 2018
When running Airflow behind a L7 proxy that sends
x-fowarded-* headers, the Flask app miscontructs
redirect URIs.

Closes apache#3580 from c4milo/master
aliceabe pushed a commit to aliceabe/incubator-airflow that referenced this pull request Jan 3, 2019
When running Airflow behind a L7 proxy that sends
x-fowarded-* headers, the Flask app miscontructs
redirect URIs.

Closes apache#3580 from c4milo/master
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Jan 23, 2019
When running Airflow behind a L7 proxy that sends
x-fowarded-* headers, the Flask app miscontructs
redirect URIs.

Closes apache#3580 from c4milo/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants