当前位置:网站首页>Lane cross domain problem
Lane cross domain problem
2022-04-23 02:04:00 【N3verL4nd】
For complex requests , The browser will send a pre check request first
curl -i 'https://ds.fe.test.sankuai.com/api/groupfission/rule/activityList?page=1&size=10&title=' \
-X 'OPTIONS' \
-H 'Accept: */*' \
-H 'Accept-Language: zh-CN,zh;q=0.9' \
-H 'Access-Control-Request-Headers: access-token,client-id,swimlane' \
-H 'Access-Control-Request-Method: GET' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Origin: http://127.0.0.1:8080' \
-H 'Pragma: no-cache' \
-H 'Referer: http://127.0.0.1:8080/' \
-H 'swimlane: 38941-ujzun' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: cross-site' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36' \
--compressed
SpringMVC Decision is the logic of pre inspection request :

SpringMVC Cross domain Default processing class :org.springframework.web.cors.DefaultCorsProcessor
No, cors To configure , Go straight back to .
HTTP/1.1 403 Forbidden
Server: openresty
Date: Thu, 21 Apr 2022 09:08:48 GMT
Content-Length: 20
Connection: keep-alive
M-TraceId: 5004084855451728121
Allow: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH
Invalid CORS request%
If the lane is configured with a white list , Trunk without , When sending a pre inspection request , Due to missing header A fixed field causes a call to the trunk . Thus, a cross domain error is reported .

Reference resources
https://www.ruanyifeng.com/blog/2016/04/cors.html
版权声明
本文为[N3verL4nd]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220839267426.html
边栏推荐
- How to change the size of SVG pictures without width in openlayer
- 世界读书日 | 技术人不要错过的好书(IT前沿技术)
- 006_redis_jedis快速入门
- Use of j-link RTT
- Sqlserver data transfer to MySQL
- 不断下沉的咖啡业,是虚假的繁荣还是破局的前夜?
- How to "gracefully" measure system performance
- ThinkPHP kernel development blind box mall source code v2 0 docking easy payment / Alibaba cloud SMS / qiniu cloud storage
- What is a dial-up server and what is its use?
- Cc2541 emulator CC debugger tutorial
猜你喜欢
随机推荐
easyswoole环境配置
不断下沉的咖啡业,是虚假的繁荣还是破局的前夜?
如何“优雅”的测量系统性能
Find the largest number of two-dimensional arrays
关于局域网浅谈
我国科学家揭示突破水稻产量瓶颈新机制
On LAN
2022.4.22-----leetcode. three hundred and ninety-six
ThinkPHP kernel development blind box mall source code v2 0 docking easy payment / Alibaba cloud SMS / qiniu cloud storage
2022.4.10-----leetcode. eight hundred and four
单片机和4G模块通信总结(EC20)
Heap overflow of kernel PWN basic tutorial
2022.4.20-----leetcode.388
How to set computer IP?
The leader / teacher asks to fill in the EXCEL form document. How to edit the word / Excel file on the mobile phone and fill in the Excel / word electronic document?
Why is one plus one equal to two
【Chrome扩展程序】content_script的跨域问题
postman里面使用 xdebug 断点调试
J-Link RTT使用
如何对代理IP进行分类?









