解决跨域问题的方案有很多,比如配置全局配置类跨域等等...
综合对比所有的跨域问题解决方式,还是觉得修改配置文件最简单,分享下来给需要的人。
spring:
application:
name: app-gateway
cloud:
nacos:
discovery:
server-addr: ip:8848
gateway:
globalcors:
corsConfigurations:
'[/**]':
allowedHeaders: "*"
allowedOrigins: "*"
allowCredentials: true
allowedMethods:
- GET
- POST
- DELETE
- PUT
- OPTION
标签:OPTION,配置文件,问题,最优,gateway,跨域
From: https://www.cnblogs.com/jingwei129/p/16716332.html