当前位置:网站首页>Chrome configuration samesite=none method
Chrome configuration samesite=none method
2022-08-03 07:02:00 【Maomao cat hair】
Tip: After the article is written, the table of contents can be automatically generated. For how to generate it, please refer to the help document on the right
Article Directory
Foreword
Chrome has a so-called same-origin policy issue since version 70.Version 80 starts to default SameSite=Lax, which results in restrictions on cross-domain cookie transmission.
The problem we encountered is: when jumping back from another website, JSESSIONID=XXXXXXXXX appears in the address bar based on the normal address, causing the original session to fail.
Second, the solution
1. Option 1: Modify browser configuration
This method is rude, directly setting the browser's SameSite property back to the previous None state.But the disadvantage is that each client machine needs to be configured, which is suitable for scenarios where the user scope is controllable.
It is said that since version 91, this method is invalid and has not been tested....
1) Enter chrome://flags in the chrome address bar
2) By disabling the "SameSite by default cookies" and "Cookies without SameSite must be secure" feature switches
3) Restart the browser
Methods 2 and 3 are to set samesite=none, and explicitly declare secure=true, and only support https and samesite=none to carry cookies across domains.
2. Option 2: Use Nginx
# Set a variable to determine whether to add the SameSite=None attributeset $cookiePathMagicFlag '';# Chrome between 00~69, set to -evil'if ($http_user_agent ~ "Chrome/([0-6][0-9].)"){set $cookiePathMagicFlag '-evil';}location / {# nginx other configuration# xxxxxxxxx# Add SameSite=None, secure configurationproxy_cookie_path /$cookiePathMagicFlag "/; httponly; secure; SameSite=None";}3. Option 3: If the server is Tomcat, you can use the following methods (Tomcat8.5.x or later)
Modify conf/context.xml
WEB-INF/web.xml ${catalina.base}/conf/web.xml Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- el-tree设置选中高亮焦点高亮、选中的节点加深背景,更改字体颜色等
- Multi-Head-Attention原理及代码实现
- MySQL 数据库基础知识(系统化一篇入门)
- MySQL的Replace用法详解
- Chrome 配置samesite=none方式
- 【dllogger bug】AttributeError: module ‘dllogger‘ has no attribute ‘StdOutBackend‘
- pyspark --- 统计多列的众数并一次返回
- PCB 多层板为什么都是偶数层?
- Command errored out with exit status 1类似问题解决方案
- 使用Contab调用Shell脚本执行expdp自动备份Oracle
猜你喜欢

ES6 - 剩余参数,Array的扩展方法,String的扩展方法

C # program with administrator rights to open by default

Zabbix历史数据清理(保留以往每个项目每天一条数据)

el-table获取读取数据表中某一行的数据属性

JumpServer如何传输文件以及复制剪切板

prometheus 监控mysql数据库

torch.nn.modules.activation.ReLU is not a Module subclass

数据库OracleRAC节点宕机处理流程

Content type ‘applicationx-www-form-urlencoded;charset=UTF-8‘ not supported“【已解决】

一根网线完美解决IPTV+千兆网复用,还不来试试
随机推荐
C#通过WebBrowser对网页截图
MySQL 操作语句大全(详细)
【项目案例】配置小型网络WLAN基本业务示例
数据库OracleRAC节点宕机处理流程
MySQL的安装教程(嗷嗷详细,包教包会~)
使用Powershell批量导入Task
VS Project Configuration Manager
国内首款PCB资料分析软件,华秋DFM使用介绍
我的Go+语言初体验——祝福留言小系统,让她也可以感受到你的祝福
ClickHouse删除数据之delete问题详解
nvm 卸载详细流程
JUC并发编程深入浅出!
【干货分享】PCB 板变形原因!不看不知道
Oracle 数据库集群常用巡检命令
RADIUS计费认证如何配置?这篇文章一步一步教你完成
el-tree设置利用setCheckedNodessetCheckedKeys默认勾选节点,以及通过setChecked新增勾选指定节点
【onnx 输入尺寸】修改pytorch生成的onnx模型的输入尺寸
TFS (Azure conversation) prohibit people checked out at the same time
CISP-PTE真题演示
MySQL中的行锁