Romanchyk commented on PR #56633:
URL: https://github.com/apache/airflow/pull/56633#issuecomment-3434103721

   It example of my NGINX configuration: I have a default redirect that forces 
all HTTP traffic to HTTPS.
   
   According to the documentation you shared, I’ve already configured all the 
required headers X-Forwarded-Proto.
   
   I also tried setting the following environment variable, but it didn’t help:
   
   - name: AIRFLOW__API__UVICORN_CMD_ARGS
     value: "--host 0.0.0.0 --port 8080 --proxy-headers"
   
   
   Next, I’ll try overriding the headers explicitly using serverSnippet, 
because I’m using a VirtualServer (Kubernetes NGINX custom resource).
   
   ```
       location / {
           proxy_connect_timeout 200s;
           proxy_read_timeout 200s;
           proxy_send_timeout 200s;
           client_max_body_size 0;
           proxy_buffer_size 8k;
           proxy_ssl_verify off;
   
           proxy_buffering on;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection $connection_upgrade;
           proxy_pass_request_headers on;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header X-Forwarded-Host $host;
           proxy_set_header X-Forwarded-Port $server_port;
           proxy_set_header X-Forwarded-Proto $scheme;
           proxy_set_header Host $host;
           proxy_pass https://airflow-test-api-server;
           proxy_next_upstream error timeout;
           proxy_next_upstream_timeout 0s;
           proxy_next_upstream_tries 0;
       }
   ``` 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to