Skip to content

Commit

Permalink
Remove unnecessary nginx redirect rule from reverse proxy documentati…
Browse files Browse the repository at this point in the history
…on (apache#38953)

* Update run-behind-proxy.rst

Remove redirect rule for flower config as per https://airflow.apache.org/docs/apache-airflow/stable/security/flower.html#flower-url-prefix

* Update run-behind-proxy.rst

* Removed comment about flower uri redirect
* Merged nginx server blocks into one
  • Loading branch information
scottlimmer authored Jun 11, 2024
1 parent 7c4ea23 commit 7c3dc5d
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions docs/apache-airflow/howto/run-behind-proxy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,15 @@ Your reverse proxy (ex: nginx) should be configured as follow:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

- rewrite the url for the flower endpoint::

server {
listen 80;
server_name lab.mycompany.com;

location /myorg/flower/ {
rewrite ^/myorg/flower/(.*)$ /$1 break; # remove prefix from http header
proxy_pass http://localhost:5555;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /myorg/flower/ {
proxy_pass http://localhost:5555;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

To ensure that Airflow generates URLs with the correct scheme when
Expand Down

0 comments on commit 7c3dc5d

Please sign in to comment.