IIS Web.config URL 写入允许 Google 分析的 HTTP
IIS Web.config URL Write Allowing HTTP for Google Analytics
我正在使用以下 Web.config 配置来重定向所有网络流量以使用 HTTPS,一切似乎都运行良好。
<rewrite>
<rules>
<rule name="Force Https" stopProcessing="true">
<match url="healthcheck.html" negate="true" />
<conditions>
<add input="{HTTP_X_FORWARDED_PROTO}" pattern="https" negate="true" />
<add input="{REMOTE_HOST}" pattern="localhost" negate="true" />
<add input="{REMOTE_ADDR}" pattern="127.0.0.1" negate="true" />
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />a
</rule>
</rules>
</rewrite>
但是,在我的网站中实施 Google 分析后,我收到以下控制台错误:
Mixed Content: The page at 'https://www.example.com/home?utm_expid=122111398-7.nRKNTAQKRlSHzexQZcWu8Q.1' was loaded over HTTPS, but requested an insecure font 'http://fonts.gstatic.com/s/roboto/v18/mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2'. This request has been blocked; the content must be served over HTTPS.
由于 GA 使用 HTTP 连接到它的某些资源,这些资源被我的 Web 应用程序阻止了。有没有办法解决这个问题?也许,允许特定域的 HTTP 流量?如果是这样,我该怎么做?
非常感谢任何指导,谢谢。
我有一些 CSS 代码使用 HTTP 来引用外部资源,将其更改为 HTTPS 就成功了。
我正在使用以下 Web.config 配置来重定向所有网络流量以使用 HTTPS,一切似乎都运行良好。
<rewrite>
<rules>
<rule name="Force Https" stopProcessing="true">
<match url="healthcheck.html" negate="true" />
<conditions>
<add input="{HTTP_X_FORWARDED_PROTO}" pattern="https" negate="true" />
<add input="{REMOTE_HOST}" pattern="localhost" negate="true" />
<add input="{REMOTE_ADDR}" pattern="127.0.0.1" negate="true" />
<add input="{HTTP_HOST}" pattern="localhost" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />a
</rule>
</rules>
</rewrite>
但是,在我的网站中实施 Google 分析后,我收到以下控制台错误:
Mixed Content: The page at 'https://www.example.com/home?utm_expid=122111398-7.nRKNTAQKRlSHzexQZcWu8Q.1' was loaded over HTTPS, but requested an insecure font 'http://fonts.gstatic.com/s/roboto/v18/mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2'. This request has been blocked; the content must be served over HTTPS.
由于 GA 使用 HTTP 连接到它的某些资源,这些资源被我的 Web 应用程序阻止了。有没有办法解决这个问题?也许,允许特定域的 HTTP 流量?如果是这样,我该怎么做?
非常感谢任何指导,谢谢。
我有一些 CSS 代码使用 HTTP 来引用外部资源,将其更改为 HTTPS 就成功了。