问题描述
我们正在与 websphere 门户合作,目前正在处理 chrome 混合内容问题,
混合内容:“https://tgcs551.commerce.toshiba.com/”上的网站是通过安全连接加载的,但“http://tgcs04.toshibacommerce.com/cs/groups/internet”上的文件/documents/document/bl82/mtqw/~edisp/tcxtu_win_614014x.zip?_ga=2.95374741.800005762.1609132621-1301842396.1608820702' 通过安全连接重定向。此文件应通过 HTTPS 提供。此下载已被阻止。有关详情,请参阅 https://blog.chromium.org/2020/02/protecting-users-from-insecure.html。
我们也在静态主题中尝试了以下元数据。
但我们没有取得任何成功。
然后我们尝试在我们的 websphere 门户的 http 服务器的 httpd.conf 文件中修改 Content-Security-Policy。
- 标头集 Content-Security-Policy "default-src https://tgcs04.toshibacommerce.com; child-src 'none'; object-src 'none'"
- 标题集 Content-Security-Policy "default-src 'none'; img-src 'self'; script-src 'self' http://tgcs04.toshibacommerce.com; style-src 'self'"
但是没有成功,最后我们通过查看日志发现http://tgcs04.toshibacommerce.com的请求没有去http服务器。
我们也已经拥有 SSL 认证网站。 我们无法移动到 https 。
所以任何人都可以帮助我们解决这个问题。
解决方法
混合内容:位于“https://tgcs551.commerce.toshiba.com/”的站点已通过安全连接加载,但是...
只是好奇你如何通过 https: 加载 https://tgcs551.commerce.toshiba.com
无效证书:
如果您无法将 HTML 代码中的 http://tgcs04.toshibacommerce.com/cs/...
更改为 https:
,Header always set Content-Security-Policy "upgrade-insecure-requests;"
应该会有所帮助。但是我在响应头中没有看到任何 Content-Security-Policy:
当然,CSP header 应该发布在下载页面上(我不知道它的 Url)。但是 https://tgcs04.toshibacommerce.com/cs/
、http://tgcs04.toshibacommerce.com/cs/groups/internet/
等都没有 CSP 标头。
还有一点很奇怪:http://tgcs04.toshibacommerce.com/
重定向到 httpS://tgcs04.toshibacommerce.com/
,http://tgcs04.toshibacommerce.com/cs/groups/
也重定向到 https:
。但是 http://tgcs04.toshibacommerce.com/cs/groups/internet/...
已经没有重定向。
此外,上面的所有网址都重定向到登录页面,但无需身份验证也可以直接下载 http://tgcs04.toshibacommerce.com/cs/groups/internet/documents/document/bl82/mtqw/~edisp/tcxtu_win_614014x.zip
。本来就是这样的?
修复 SSL 证书(生成通配符证书 *.toshibacommerce.com
可能更好)并发布 CSP 标头。