当前位置:网站首页>【教程】chrome关闭跨域策略cors、samesite,跨域带上cookie
【教程】chrome关闭跨域策略cors、samesite,跨域带上cookie
2022-07-03 02:17:00 【云牧青】
谷歌浏览器允许跨域origin,disable samesite,方便本地开发调试,测试csrf跨站请求伪造漏洞
写稿时间:2022年6月30日
犹记得两年前,测试csrf漏洞时得心应手。现如今,csrf已成历史
chrome,Firefox更新迭代到现在,已将跨域请求打到苟延残喘
苦了本地调试的开发人员,前端一个端口,后端一个端口,就跨域无法带cookie了
网上广为流传的开启跨域的方法,以以下命令启动chrome:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="D:\ChromeDevUserData"
这会启动一个和你原本chrome互不干扰的浏览器,但目前实测最新版浏览器,依旧不能复现csrf,但是用以下增强版,似乎是能解决本地调试前后端时的跨域问题的
"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-site-isolation-trials --disable-web-security --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure --user-data-dir="D:\ChromeDevUserData"
依旧不能复现csrf,想复现,只能使用旧版chrome
旧版chrome可以在这里直接下载:https://www.chromedownloads.net/chrome64win-stable/
如果不想用百度云盘,而且想在官网下载的话,可以这样操作
- 根据chrome版本号,找到内部的版本号
https://omahaproxy.appspot.com/
- 根据内部版本号,去下载离线包
https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html
亲测可用的版本:722274,19年12月的版本
选win64 zip使用上述增强参数启动即可
边栏推荐
- MySQL学习03
- awk从入门到入土(3)awk内置函数printf和print实现格式化打印
- 502 (bad gateway) causes and Solutions
- Cancellation of collaboration in kotlin, side effects of cancellation and overtime tasks
- 浏览器是如何对页面进行渲染的呢?
- A 30-year-old software tester, who has been unemployed for 4 months, is confused and doesn't know what to do?
- [shutter] hero animation (hero realizes radial animation | hero component createrecttween setting)
- COM and cn
- Stm32f407 ------- IIC communication protocol
- 微信小程序开发工具 POST net::ERR_PROXY_CONNECTION_FAILED 代理问题
猜你喜欢
詳細些介紹如何通過MQTT協議和華為雲物聯網進行通信
微服务组件Sentinel (Hystrix)详细分析
PyTorch 卷积网络正则化 DropBlock
MySQL学习03
Recommendation letter of "listing situation" -- courage is the most valuable
全链路数字化转型下,零售企业如何打开第二增长曲线
[shutter] top navigation bar implementation (scaffold | defaulttabcontroller | tabbar | tab | tabbarview)
通达OA v12流程中心
Introduce in detail how to communicate with Huawei cloud IOT through mqtt protocol
Visual yolov5 format data set (labelme JSON file)
随机推荐
SPI机制
Prohibited package name
RestCloud ETL 跨库数据聚合运算
[Flutter] dart: class; abstract class; factory; Class, abstract class, factory constructor
Pytorch convolution network regularization dropblock
深度学习笔记(持续更新中。。。)
Startup mode and scope builder of collaboration in kotlin
[shutter] bottom navigation bar implementation (bottomnavigationbar bottom navigation bar | bottomnavigationbaritem navigation bar entry | pageview)
Qt之QComboBox添加QCheckBox(下拉列表框插入复选框,含源码+注释)
Distributed transaction solution
2022 spring "golden three silver four" job hopping prerequisites: Software Test interview questions (with answers)
Anna: Beibei, can you draw?
Missing library while loading shared libraries: libisl so. 15: cannot open shared object file: No such file
Return a tree structure data
通达OA 首页门户工作台
Exception handling in kotlin process
Flink CDC mongoDB 使用及Flink sql解析monggo中复杂嵌套JSON数据实现
【ROS进阶篇】第六讲 ROS中的录制与回放(rosbag)
What are the differences between software testers with a monthly salary of 7K and 25K? Leaders look up to you when they master it
力扣(LeetCode)183. 从不订购的客户(2022.07.02)