nginx配置
server {
listen 80;
server_name dev-platform.leyanbot.com;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,web-token,app-token,Authorization,Accept,Origin,Keep-Alive,User-Agent,X-Mx-ReqToken,X-Data-Type,X-Auth-Token,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
#root /usr/share/nginx/html/;
#try_files $uri $uri/ /index.html last;
#index index.html;
location / {
root /usr/share/nginx/html/;
try_files $uri $uri/ /index.html last; index index.html;
}
location /api {
proxy_pass http://10.24.1.241:9020;
}
}