ci(custom): 调整nginx配置
This commit is contained in:
42
default.conf
42
default.conf
@@ -1,18 +1,24 @@
|
||||
server {
|
||||
# 监听ipv4
|
||||
listen 80;
|
||||
# 监听ipv6
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
server {
|
||||
# 监听ipv4
|
||||
listen 80;
|
||||
# 监听ipv6
|
||||
listen [::]:80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
add_header Access-Control-Allow-Headers *;
|
||||
add_header Access-Control-Allow-Methods *;
|
||||
add_header Access-Control-Allow-Credentials true;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
add_header Cache-Control no-cache;
|
||||
add_header Access-Control-Max-Age 1728000;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user