fix: nginx配置文件修改,解决跨域问题。

This commit is contained in:
tianyongbao
2026-02-04 18:23:58 +08:00
parent f599298d24
commit e960db1a64

View File

@@ -105,7 +105,6 @@ http {
add_header Access-Control-Allow-Origin * always; # 你的前端源站,必须指定具体地址(比*安全)
add_header Access-Control-Allow-Methods 'GET,POST,PUT,DELETE,OPTIONS' always; # 允许前端的请求方法
add_header Access-Control-Allow-Headers 'Content-Type,Authorization,Token,X-Requested-With' always; # 允许前端的自定义请求头(根据实际需求补充)
; add_header Access-Control-Allow-Credentials true always; # 允许跨域携带Cookie/Token登录必备
add_header Access-Control-Max-Age 3600 always; # 预检请求缓存时间1小时减少OPTIONS请求
}