前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >阻止谷歌浏览器 http 强制跳转 https

阻止谷歌浏览器 http 强制跳转 https

作者头像
为为为什么
发布2024-05-23 14:25:03
3490
发布2024-05-23 14:25:03
举报
文章被收录于专栏:又见苍岚又见苍岚

在使用 Chrome 浏览器的过程中,发现如果不小心在谷歌浏览器中输入了https域名之后,再次访问后续此域名都会强制跳转到https,本文记录防止强制 https 的解决方案。

问题原因

HSTS 协议阻止 http 强制转换 https

HTTP Strict Transport Security HTTP Strict Transport Security (HSTS) is an opt-in security enhancement specified through the use of a special response header. Once a supported browser receives this header that browser will prevent any communications from being sent over HTTP to the specified domain and will instead send all communications over HTTPS. HSTS is enabled by default. To disable this behavior use hsts: “false” in the configuration ConfigMap.

解决方案

  1. 访问:chrome://net-internals/#hsts
  2. 删除需要阻止强制转换的域名(二级域名) 例如我不需要浏览器强制转换 uipv4.zywvvd.com 为 https 协议访问,那就在 hsts 策略中删除这个域名

之后显示查询不到该域名的 hsts 记录表示成功

这个是暂时性的方法,一旦再次输入 https 协议访问该域名还是会变回去的。

参考资料

文章链接: https://cloud.tencent.com/developer/article/2419852

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2024-5-22,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 问题原因
  • 解决方案
  • 参考资料
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档