mirror of
https://github.com/hexastack/hexabot
synced 2024-11-25 21:37:59 +00:00
58 lines
1.8 KiB
Plaintext
58 lines
1.8 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
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 /widget/ {
|
|
rewrite ^/widget/?(.*)$ /$1 break;
|
|
proxy_pass http://widget:5173;
|
|
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;
|
|
}
|
|
|
|
|
|
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";
|
|
}
|
|
} |