当前位置:网站首页>双重跨域:Access-Allow-Origin header contains multiple values“*, *”,but only one is allowed
双重跨域:Access-Allow-Origin header contains multiple values“*, *”,but only one is allowed
2022-06-22 21:18:00 【心怀敬意】
问题:前端调试发现接口响应头中存在两个Access-Allow-Origin ,但是后端通过apifox或者postman调试都无法重新问题。
原因:后台在网关(spring cloud gateway)开启跨域后,在服务中也拦截了特定路径进行跨域。wtf。
spring:
cloud:
gateway:
#解决双重跨域
default-filters:
- DedupeResponseHeader=Access-Control-Allow-Origin Access-Control-Allow-Credentials,
globalcors:
cors-configurations:
'[/**]':
allowed-origins: "*"
allowed-methods: "*"
allowed-headers: "x-requested-with,Content-Language,Authorization,Access-Control-Allow-Origin,request-id,Accept-Language,content-type,content-disposition"
allow-credentials: true
边栏推荐
- Spark SQL 访问json和jdbc数据源
- Synchronization circuit and cross clock domain circuit design 2 -- cross clock domain transmission (FIFO) of multi bit signals
- Dip1000,1 of D
- Is it difficult to turn weak current into professional network worker? Huawei pre-sales engineers share their own experience
- 2021-04-14
- Learning the interpretable representation of quantum entanglement, the depth generation model can be directly applied to other physical systems
- C language -- 17 function introduction
- [redisson] source code analysis of multilock
- Eslint simple configuration
- 【STM32技巧】使用STM32 HAL库的硬件I2C驱动RX8025T实时时钟芯片
猜你喜欢

【Kubernetes 系列】Kubernetes 概述

2021-08-22

Redis cache

2021-04-05

同步电路与跨时钟域电路设计2——多bit信号的跨时钟域传输(FIFO)
Learn redis with you (11) -- redis distributed lock

mysql主从同步及其分库分表基本流程

口令安全是什么意思?等保2.0政策中口令安全标准条款有哪些?

Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file

【ARM】讯为rk3568开发板lvds屏设置横屏显示
随机推荐
OJ daily practice - filter extra spaces
剑指 Offer 11. 旋转数组的最小数字
Is it safe to make an appointment to pay new debts? Is it reliable?
Synchronization circuit and cross clock domain circuit design 2 -- cross clock domain transmission (FIFO) of multi bit signals
What does password security mean? What are the password security standard clauses in the ISO 2.0 policy?
Install the typescript environment and enable vscode to automatically monitor the compiled TS file as a JS file
2021-05-02
Array and string offset access syntax with curly braces is no longer support
flutter外包,承接flutter项目
Asynchronous FIFO
[STM32 skill] use the hardware I2C of STM32 Hal library to drive rx8025t real-time clock chip
2021-04-05
WebRTC系列-网络传输之4Connection排序
PHP7.3报错undefined function simplexml_load_string()
js判断浏览器是否打开了控制台
Good things to share
Ensure database and cache consistency
mysql主从同步及其分库分表基本流程
OJ每日一练——验证子串
DCC888 :SSA (static single assignment form)