You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
listen [::]:80;
|
|
|
|
server_name _;
|
|
|
|
gzip on;
|
|
|
|
gzip_min_length 1k;
|
|
|
|
gzip_comp_level 9;
|
|
|
|
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
|
|
|
|
gzip_vary on;
|
|
|
|
gzip_disable "MSIE [1-6]\.";
|
|
|
|
resolver $NAMESERVERS ipv6=off;
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
|
|
|
|
if ($http_Host !~* ^{SERVER_NAME}) {
|
|
|
|
return 403;
|
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
|
|
|
index index.html;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ^~/api/ {
|
|
|
|
if ($request_uri ~* ^/api/(.*)$) {
|
|
|
|
proxy_pass {API_BASE_PATH}$1;
|
|
|
|
}
|
|
|
|
#proxy_pass http://host.docker.internal:8840/;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
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_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_connect_timeout 1;
|
|
|
|
proxy_buffering off;
|
|
|
|
chunked_transfer_encoding off;
|
|
|
|
proxy_cache off;
|
|
|
|
proxy_send_timeout 30m;
|
|
|
|
proxy_read_timeout 30m;
|
|
|
|
client_max_body_size 500m;
|
|
|
|
}
|
|
|
|
}
|