优化:优化跨域配置,可支持配置允许跨域的具体域名或 *

This commit is contained in:
2023-03-23 19:54:15 +08:00
parent 30ba5bb5f4
commit 8591a24730
3 changed files with 14 additions and 8 deletions

View File

@@ -176,11 +176,7 @@ local-storage:
--- ### 跨域配置
cors:
# 配置允许跨域的域名
allowedOrigins:
- http://127.0.0.1:5173
- http://localhost:5173
- http://cnadmin.charles7c.top
- https://cnadmin.charles7c.top
allowedOrigins: '*'
# 配置允许跨域的请求方式
allowedMethods: '*'
# 配置允许跨域的请求头