cors配置
This commit is contained in:
@@ -11,6 +11,22 @@ spring:
|
|||||||
name: aida-gateway
|
name: aida-gateway
|
||||||
cloud:
|
cloud:
|
||||||
gateway:
|
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:
|
routes:
|
||||||
- id: aida-back
|
- id: aida-back
|
||||||
uri: lb://aida-back
|
uri: lb://aida-back
|
||||||
|
|||||||
Reference in New Issue
Block a user