当前位置:网站首页>【教程】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使用上述增强參數啟動即可
边栏推荐
- [Flutter] dart: class;abstract class;factory;类、抽象类、工厂构造函数
- GBase 8c系统表-pg_conversion
- 详细些介绍如何通过MQTT协议和华为云物联网进行通信
- 线程安全的单例模式
- 微服务组件Sentinel (Hystrix)详细分析
- File class (add / delete)
- 可视化yolov5格式数据集(labelme json文件)
- Visualisation de l'ensemble de données au format yolov5 (fichier labelme json)
- awk从入门到入土(0)awk概述
- Exception handling in kotlin process
猜你喜欢
随机推荐
Leetcode 183 Customers who never order (2022.07.02)
udp接收队列以及多次初始化的测试
RestCloud ETL 跨库数据聚合运算
Recommendation letter of "listing situation" -- courage is the most valuable
Memory pool (understand the process of new developing space from the perspective of kernel)
力扣(LeetCode)183. 从不订购的客户(2022.07.02)
awk从入门到入土(2)认识awk内置变量和变量的使用
Ni visa fails after LabVIEW installs the third-party visa software
Su Shimin: 25 principles of work and life
[shutter] shutter debugging (debugging fallback function | debug method of viewing variables in debugging | console information)
leetcode961. Find the elements repeated N times in the array with length 2n
各国Web3现状与未来
Servlet中数据传到JSP页面使用el表达式${}无法显示问题
Pytorch convolution network regularization dropblock
What are MySQL locks and classifications
Socket编程
[Flutter] dart: class; abstract class; factory; Class, abstract class, factory constructor
创建+注册 子应用_定义路由,全局路由与子路由
Asian Games countdown! AI target detection helps host the Asian Games!
Swift development learning