如何关闭浏览器的HSTS功能 禁止访问域名自动跳转到https

      发布在:个人笔记      评论:0 条评论
<p style="margin: 10px auto; padding: 0px; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);">如何禁止访问域名自动跳转到https呢,这个问题是由于浏览器的HSTS(HTTP Strict Transport Security)功能导致的。HSTS是一种安全协议,它会告诉浏览器只能通过https访问某些网站,而禁止http方式。</p><p style="margin: 10px auto; padding: 0px; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);">我们需要做的就是删除浏览器某些域名自动跳转到https协议下访问的情况,不同浏览器有不同的处理方式,具体参考如下</p><h2 style="margin: 20px 0px; padding: 0px; font-size: 21px; line-height: 1.5; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);">Safari 浏览器</h2><ol style="margin-bottom: 1em; margin-left: 40px; padding: 0px; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);" class=" list-paddingleft-2"><li><p>完全关闭 Safari</p></li><li><p>删除&nbsp;<code style="margin: 0px 3px; padding: 0px 5px; font-family: &quot;Courier New&quot;, sans-serif; font-size: 12px; line-height: 1.8; display: inline-block; overflow-x: auto; vertical-align: middle; border-radius: 3px; background-color: rgb(246, 246, 246); color: rgb(232, 62, 140);">~/Library/Cookies/HSTS.plist</code>&nbsp;这个文件</p></li><li><p>重新打开 Safari 即可</p></li><li><p>极少数情况下,需要重启系统</p></li></ol><h2 style="margin: 20px 0px; padding: 0px; font-size: 21px; line-height: 1.5; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);">Chrome 浏览器</h2><ol style="margin-bottom: 1em; margin-left: 40px; padding: 0px; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);" class=" list-paddingleft-2"><li><p>地址栏中输入&nbsp;<code style="margin: 0px 3px; padding: 0px 5px; font-family: &quot;Courier New&quot;, sans-serif; font-size: 12px; line-height: 1.8; display: inline-block; overflow-x: auto; vertical-align: middle; border-radius: 3px; background-color: rgb(246, 246, 246); color: rgb(232, 62, 140);">chrome://net-internals/#hsts</code></p></li><li><p>在&nbsp;<code style="margin: 0px 3px; padding: 0px 5px; font-family: &quot;Courier New&quot;, sans-serif; font-size: 12px; line-height: 1.8; display: inline-block; overflow-x: auto; vertical-align: middle; border-radius: 3px; background-color: rgb(246, 246, 246); color: rgb(232, 62, 140);">Delete domain</code>&nbsp;中输入项目的域名,并&nbsp;<code style="margin: 0px 3px; padding: 0px 5px; font-family: &quot;Courier New&quot;, sans-serif; font-size: 12px; line-height: 1.8; display: inline-block; overflow-x: auto; vertical-align: middle; border-radius: 3px; background-color: rgb(246, 246, 246); color: rgb(232, 62, 140);">Delete</code>&nbsp;删除</p></li><li><p>可以在&nbsp;<code style="margin: 0px 3px; padding: 0px 5px; font-family: &quot;Courier New&quot;, sans-serif; font-size: 12px; line-height: 1.8; display: inline-block; overflow-x: auto; vertical-align: middle; border-radius: 3px; background-color: rgb(246, 246, 246); color: rgb(232, 62, 140);">Query domain</code>&nbsp;测试是否删除成功</p><p><span style="color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);">另外</span><a href="https://chrome.google.com/webstore/detail/url-rule/enfdapnpdfpgjamddpkdfliienniaimb/related?hl=zh-CN&authuser=0" target="_blank">URL Rule</a><span style="background-color: rgb(255, 255, 255); color: rgb(18, 18, 18); font-family: -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Source Han Sans SC&quot;, &quot;Noto Sans CJK SC&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif; font-size: 15px;">&nbsp;一插件也能够解决协议跳转问题</span><br/></p></li></ol><h2 style="margin: 20px 0px; padding: 0px; font-size: 21px; line-height: 1.5; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);">Opera 浏览器</h2><p style="margin: 10px auto; padding: 0px; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);">和 Chrome 方法一样</p><h2 style="margin: 20px 0px; padding: 0px; font-size: 21px; line-height: 1.5; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);">Firefox 浏览器</h2><ol style="margin-bottom: 1em; margin-left: 40px; padding: 0px; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);" class=" list-paddingleft-2"><li><p>关闭所有已打开的页面</p></li><li><p>清空历史记录和缓存</p></li><li><p>地址栏输入&nbsp;<code style="margin: 0px 3px; padding: 0px 5px; font-family: &quot;Courier New&quot;, sans-serif; font-size: 12px; line-height: 1.8; display: inline-block; overflow-x: auto; vertical-align: middle; border-radius: 3px; background-color: rgb(246, 246, 246); color: rgb(232, 62, 140);">about:permissions</code></p></li><li><p>搜索项目域名,并点击&nbsp;<code style="margin: 0px 3px; padding: 0px 5px; font-family: &quot;Courier New&quot;, sans-serif; font-size: 12px; line-height: 1.8; display: inline-block; overflow-x: auto; vertical-align: middle; border-radius: 3px; background-color: rgb(246, 246, 246); color: rgb(232, 62, 140);">Forget About This Site</code></p></li></ol><p><strong>Microsoft Edge</strong></p><p>1. 在Edge浏览器的地址栏中输入:edge://net-internals/#hsts。</p><p>2. 在Delete domain中输入您想要访问的网站的域名,并点击Delete(删除)。</p><p>3. 您可以在Query domain中测试是否删除成功。</p><p style="margin: 10px auto; padding: 0px; color: rgb(51, 51, 51); font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);"><img src="http://img.80zx.com/ueditor/image/202308/1692027018b5c3e5.gif" title="hsts查询和删除" alt="hsts查询和删除"/></p><p><br/></p>
相关文章
热门推荐