hexabot/docker/nginx/unsecure/default.conf.template

46 lines
1.5 KiB
Plaintext
Raw Normal View History

2024-09-10 09:50:11 +00:00
server {
listen 80;
2024-09-13 08:38:49 +00:00
server_name ${APP_DOMAIN};
2024-09-10 09:50:11 +00:00
server_tokens off;
client_max_body_size 20M;
location / {
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Url-Scheme $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://frontend:8080;
}
location /api/ {
rewrite ^/api/?(.*)$ /$1 break;
proxy_pass http://api:3000;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $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 Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-NginX-Proxy false;
proxy_pass_request_headers on;
}
location ~* \.io {
rewrite ^/api/?(.*)$ /$1 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy false;
proxy_pass http://api:3000;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}