cors配置

This commit is contained in:
litianxiang
2026-05-05 15:52:11 +08:00
parent af8fedfee4
commit edb0c01ec0

View File

@@ -11,6 +11,22 @@ spring:
name: aida-gateway
cloud:
gateway:
# ---------- 全局 CORS 配置 ----------
globalcors:
cors-configurations:
'[/**]':
allowed-origin-patterns: "*"
allowed-methods:
- GET
- POST
- PUT
- DELETE
- OPTIONS
- PATCH
allowed-headers: "*"
allow-credentials: true
max-age: 3600
# ---------- 路由配置 ----------
routes:
- id: aida-back
uri: lb://aida-back