43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
server_tokens off;
|
|
client_max_body_size 20m;
|
|
add_header X-Content-Type-Options nosniff always;
|
|
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
|
add_header X-Frame-Options SAMEORIGIN always;
|
|
# Do not log prompts, credentials or query strings.
|
|
access_log off;
|
|
location = /nginx-health { access_log off; return 200 "ok\n"; }
|
|
location /actuator { return 404; }
|
|
location ~ /\. { return 404; }
|
|
location = /health {
|
|
proxy_pass http://moyi-api:8787/health;
|
|
}
|
|
location /api/ {
|
|
proxy_pass http://moyi-api:8787;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header Forwarded "";
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_connect_timeout 5s;
|
|
proxy_read_timeout 120s;
|
|
proxy_next_upstream off;
|
|
}
|
|
location /v1/ {
|
|
proxy_pass http://moyi-api:8787;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header Forwarded "";
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Connection "";
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
proxy_connect_timeout 5s;
|
|
proxy_read_timeout 120s;
|
|
proxy_send_timeout 120s;
|
|
proxy_next_upstream off;
|
|
}
|
|
location / { try_files $uri $uri/ /index.html; }
|