当前位置:网站首页>The solution after the samesite by default cookies of Chrome browser 91 version are removed, and the solution that cross domain post requests in chrome cannot carry cookies
The solution after the samesite by default cookies of Chrome browser 91 version are removed, and the solution that cross domain post requests in chrome cannot carry cookies
2022-07-28 05:08:00 【Jason–json】
On Monday morning, when I turn on my computer to prepare for the development project , Suddenly found that the website login jump is abnormal , Why can't I log in? I always jump back to the login page . After eliminating the reason of the back end through packet capturing , Find the backend set-cookie There is no effect , All of a sudden Chrome Disable third parties Cookies The plan for , open Edge The update record of has been automatically updated to Chromium 91 了 .
Because the development environment needs , We put the browser's same-site-by-default-cookies and cookies-without-same-site-must-be-secure Both flag It's banned in the . But update to 91 After version , Chromium Directly turn off the option and set it to on by default , Then there is no way in flag Set up inside. .
Solution
1.
lower than 91 Version of Chrome browser :
Chrome Medium access address chrome://flags/ Search for samesite take same-site-by-default-cookies, and SameSite by default cookies These two Set to Disabled Restart the project after the browser . By default, this setting will not specify SameSite Property request SameSite=Lax To deal with it .

2. window,91 Version and above Chrome browser :( programme 1 The settings in 91 Version has been Chorme remove )
Windows: open Chrome Properties of shortcut , stay The goal is Add
--disable-features=SameSiteByDefaultCookiesOr add
--flag-switches-begin --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure --flag-switches-end, Click ok ,( Be careful !!! Be sure to close all browsers , Be sure to add a few spaces after the goal ) Then restart the browser .

Mac:Mac The system can solve this problem by opening the browser with parameters on the command line , You must close all browser windows and sign out Operate after browser .
- Turn on Chrome command :
open -a "Google Chrome" --args --disable-features=SameSiteByDefaultCookies - Turn on Chromium edition Edge Browser commands :
open -a "Microsoft Edge" --args --disable-features=SameSiteByDefaultCookies

3. 94 And above Chrome browser
Chromium Project website Mentioned in 94 Version disable settings via the command line SameSite The default method will be removed , Arrival plan 1 And solution 2 Will not be able to use , It can be passed later nginx And other agent tools or software turn cross domain requests into non cross domain requests to solve the problem . If you want to work in the development environment in the future , Honestly https Maybe the simplest way .
thank ! https://juejin.cn/post/6967695146322247716 And https://gadzan.com/chrome-edge-91hou
边栏推荐
- 【CVPR2022 oral】Balanced Multimodal Learning via On-the-fly Gradient Modulation
- I've been in an outsourcing company for two years, and I feel like I'm going to die
- Message forwarding mechanism -- save your program from crashing
- Testcafe's positioning, operation of page elements, and verification of execution results
- Real intelligence has been certified by two of the world's top market research institutions and has entered the global camp of excellence
- After a year of unemployment, I learned to do cross-border e-commerce and earned 520000. Only then did I know that going to work really delayed making money!
- jsonp 单点登录 权限检验
- Program life | how to switch to software testing? (software testing learning roadmap attached)
- C language classic 100 question exercise (1~21)
- Look at the experience of n-year software testing summarized by people who came over the test
猜你喜欢

Observable time series data downsampling practice in Prometheus

flink思维导图

Research on the design of robot education in stem course

【内功心法】——函数栈帧的创建和销毁(C实现)

Dcgan:deep volume general adaptive networks -- paper analysis

MySQL 默认隔离级别是RR,为什么阿里等大厂会改成RC?

CPU and memory usage are too high. How to modify RTSP round robin detection parameters to reduce server consumption?

Configuration experiment of building virtual private network based on MPLS

Transformer -- Analysis and application of attention model

Summary and review of puppeter
随机推荐
从微服务基本概念到核心组件-通过一个实例来讲解和分析
Comprehensively analyze the differences between steam and maker Education
基于MPLS构建虚拟专网的配置实验
RT_ Use of thread message queue
Improving the readability of UI layer test with puppeter
[daily question 1] 735. Planetary collision
【CVPR2022 oral】Balanced Multimodal Learning via On-the-fly Gradient Modulation
What is the reason why the easycvr national standard protocol access equipment is online but the channel is not online?
jsonp 单点登录 权限检验
Redux basic syntax
[paper notes] - low illumination image enhancement - zeroshot - rrdnet Network - 2020-icme
Gym 101911c bacteria (minimum stack)
C language classic 100 question exercise (1~21)
如何在 FastReport VCL 中通过 Outlook 发送和接收报告?
Data imbalance: comprehensive sampling of anti fraud model (data imbalance)
数据库日期类型全部为0
Introduction to testcafe
HDU 1530 maximum clique
Real intelligence has been certified by two of the world's top market research institutions and has entered the global camp of excellence
【ARIXV2204】Neighborhood attention transformer