mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
62 lines
1.5 KiB
Plaintext
62 lines
1.5 KiB
Plaintext
upstream baseApi {
|
|
server 0.0.0.0:5600;
|
|
}
|
|
|
|
upstream publicApi {
|
|
server 0.0.0.0:5400;
|
|
}
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default keep-alive;
|
|
'websocket' upgrade;
|
|
}
|
|
|
|
server {
|
|
listen 5700;
|
|
IPV6_CONFIG
|
|
root /ql/static/dist;
|
|
ssl_session_timeout 5m;
|
|
|
|
location QL_BASE_URL/api/public/ {
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_pass http://publicApi/api/public/;
|
|
}
|
|
|
|
location QL_BASE_URL/api/ {
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_pass http://baseApi/api/;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
}
|
|
|
|
location QL_BASE_URL/open/ {
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_pass http://baseApi/open/;
|
|
}
|
|
|
|
gzip on;
|
|
gzip_static on;
|
|
gzip_types text/plain application/json application/javascript application/x-javascript text/css application/xml text/javascript;
|
|
gzip_proxied any;
|
|
gzip_vary on;
|
|
gzip_comp_level 6;
|
|
gzip_buffers 16 8k;
|
|
gzip_http_version 1.0;
|
|
|
|
location QL_BASE_URL/ {
|
|
index index.html index.htm;
|
|
try_files $uri $uri/ QL_BASE_URL/index.html;
|
|
}
|
|
|
|
location ~ .*\.(html)$ {
|
|
add_header Cache-Control no-cache;
|
|
}
|
|
}
|