|
|
|
@ -1,27 +1,13 @@ |
|
|
|
worker_processes 1; |
|
|
|
|
|
|
|
events { |
|
|
|
worker_connections 1024; |
|
|
|
} |
|
|
|
|
|
|
|
http { |
|
|
|
include mime.types; |
|
|
|
default_type application/octet-stream; |
|
|
|
|
|
|
|
sendfile on; |
|
|
|
|
|
|
|
server { |
|
|
|
listen 5000; |
|
|
|
server_name _; |
|
|
|
client_max_body_size 20M; |
|
|
|
|
|
|
|
# 静态资源和前端页面 |
|
|
|
location / { |
|
|
|
root /usr/share/nginx/html; |
|
|
|
try_files $uri $uri/ /index.html; |
|
|
|
index index.html; |
|
|
|
|
|
|
|
# CORS |
|
|
|
add_header 'Access-Control-Allow-Origin' '*'; |
|
|
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; |
|
|
|
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'; |
|
|
|
@ -33,7 +19,6 @@ http { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# 代理 API 请求到后端容器 |
|
|
|
location /admin-api/ { |
|
|
|
proxy_pass http://alert-backend:48080; |
|
|
|
proxy_set_header Host $host; |
|
|
|
@ -48,4 +33,3 @@ http { |
|
|
|
root /usr/share/nginx/html; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|