Commit b88ba4c4 by Administrator

Update techhero-framework-gateway-local.yml

parent 7c01768e
spring: spring:
cloud: cloud:
gateway: gateway:
globalcors: globalcors: # 全局的跨域处理
cors-configurations: add-to-simple-url-handler-mapping: true # 解决options请求被拦截问题
'[/**]': corsConfigurations:
# 允许携带认证信息 '[/**]':
# 允许跨域的源(网站域名/ip),设置*为全部 allowedOrigins: # 允许哪些网站的跨域请求 allowedOrigins: “*” 允许所有网站
# 允许跨域请求里的head字段,设置*为全部 - "https://localhost:8001"
# 允许跨域的method, 默认为GET和OPTIONS,设置*为全部 - "https://localhost:8002"
# 跨域允许的有效期 - "https://localhost:8003"
allow-credentials: true allowedMethods: # 允许的跨域ajax的请求方式 “*” 允许所有
allowed-originPatterns: "*" - "GET"
allowed-headers: "*" - "POST"
allowed-methods: "*" - "DELETE"
max-age: 3600 - "PUT"
- "OPTIONS"
allowedHeaders: "*" # 允许在请求中携带的头信息
allowCredentials: true # 是否允许携带cookie
maxAge: 360000 # 这次跨域检测的有效期
http: http:
multipart: multipart:
enabled: true enabled: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment