Skip to content

Commit 45e060b

Browse files
committed
fix nginx/proxy configuration
1 parent 6d1519e commit 45e060b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ services:
3737
# - MOSAIC_CONCURRENCY= # will default to `RIO_TILER_MAX_THREADS`
3838
# rio-tiler config
3939
# - RIO_TILER_MAX_THREADS=
40+
volumes:
41+
- ./:/data
4042

4143
titiler-gunicorn:
4244
extends:
@@ -58,12 +60,12 @@ services:
5860
- 8081:8081
5961
environment:
6062
- TITILER_API_ROOT_PATH=/api/v1/titiler
61-
command: ["uvicorn", "titiler.application.main:app", "--host", "0.0.0.0", "--port", "8081", "--workers", "1"]
63+
command: ["uvicorn", "titiler.application.main:app", "--host", "0.0.0.0", "--port", "8081", "--workers", "1", "--proxy-headers", "--forwarded-allow-ips=*"]
6264

6365
nginx:
6466
image: nginx
6567
ports:
66-
- 80:80
68+
- 8080:80
6769
volumes:
6870
- ./dockerfiles/nginx.conf:/etc/nginx/nginx.conf
6971
depends_on:

dockerfiles/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ http {
77
location /api/v1/titiler {
88
rewrite ^/api/v1/titiler(.*)$ $1 break;
99
proxy_pass http://nginx-titiler:8081;
10-
proxy_set_header HOST $host;
10+
proxy_set_header HOST $http_host;
1111
proxy_set_header Referer $http_referer;
1212
proxy_set_header X-Forwarded-For $remote_addr;
1313
proxy_set_header X-Forwarded-Proto $scheme;

0 commit comments

Comments
 (0)