【问题标题】:Prevent Chrome from redirecting to https on certain domains?阻止 Chrome 在某些域上重定向到 https?
【发布时间】:2018-06-11 17:57:03
【问题描述】:

我正在使用 Laravel 代客在我的本地计算机上托管网站,以使用 *.app 域进行开发。每当我尝试使用 Chrome 访问 URL 时,它们都会重定向到 https 版本(我不想要)。如何更改本地网站的这种行为?

【问题讨论】:

    标签: google-chrome-devtools google-chrome-app


    【解决方案1】:

    无法在 Chrome 上阻止此行为,但在 Firefox 上可以。 您别无选择,只能使用替代解决方案。

    通过这个article

    1. 在 Firefox 中,通过地址栏访问 about:config
    2. 搜索参数network.stricttransportsecurity.preloadlist
    3. 将其值更改为false

    【讨论】:

      【解决方案2】:

      这似乎是 Chrome 63 更新后的预期行为。 This blog 谈到了 .dev,但这显然也发生在 .app 上。

      tl;dr:Chrome 63(自 2017 年 12 月起推出)将强制所有域 以 .dev(和 .foo)结尾,通过预加载重定向到 HTTPS HTTP 严格传输安全 (HSTS) 标头。

      这会将以下行添加到 Chromium 的预加载列表中;

      { "name": "dev", "include_subdomains": true, "mode": "force-https" },
      { "name": "foo", "include_subdomains": true, "mode": "force-https" },
      

      【讨论】:

      • 有什么办法可以防止它在 .app 域上强制使用 https?
      猜你喜欢
      • 2018-05-23
      • 2015-06-24
      • 1970-01-01
      • 1970-01-01
      • 2020-10-03
      • 2018-07-14
      • 2019-12-16
      相关资源
      最近更新 更多