Make uvicorn understand nginx

This commit is contained in:
decentral1se 2021-06-11 18:51:36 +02:00
parent c3b0a59fde
commit 41565ec82e
No known key found for this signature in database
GPG Key ID: 92DAD76BD9567B8A
2 changed files with 7 additions and 1 deletions

View File

@ -41,7 +41,12 @@ services:
target: /usr/local/bin/entrypoint.sh
mode: 0555
entrypoint: /usr/local/bin/entrypoint.sh
command: "uvicorn --host 0.0.0.0 keycloak_collective_portal:app"
command: |
uvicorn
--host 0.0.0.0
--forwarded-allow-ips='*'
--proxy-headers
keycloak_collective_portal:app"
networks:
proxy:

View File

@ -30,6 +30,7 @@ http {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;
}
}