-
-
Notifications
You must be signed in to change notification settings - Fork 365
/
nginx.conf
30 lines (28 loc) · 826 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
server {
listen 80;
listen [::]:80;
server_name _;
location / {
root /usr/share/nginx/html;
try_files $uri $uri/index.html $uri.html /index.html;
}
# proxy /api to the backend, remove the /api/ part
location /api/ {
rewrite ^/api(/.*)$ $1 break;
# dont batch answers
proxy_buffering off;
client_max_body_size 0;
proxy_http_version 1.1;
proxy_request_buffering off;
proxy_pass http://backend:8080/;
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;
}
# include mime.types;
# types {
# application/javascript js mjs;
# text/html html;
# }
}