如何解决 TYPO3 中的混合内容问题

发布于 2025-01-20 18:49:31 字数 319 浏览 6 评论 0原文

我在使用 TYPO3 开发的网站上遇到问题。问题是 CSS 文件、JavaScript 和图像不起作用。许多图像和其他功能(例如滑块)无法正常工作。

这是第一个问题: 混合内容:通过 HTTPS 加载所有资源,以提高站点的安全性

Mixed content issues

以及这个另一个问题是:确保 CORS 请求来源与资源允许的来源相匹配

Second issues

I have a problem on my website developed with TYPO3. The problem is that CSS files and JavaScript and images not working. So many images and other functionality such as the slider are not working.

This is the first issue: Mixed content: load all resources via HTTPS to improve the security of your site

Mixed content issues

And this is the other issue: Ensure CORS requesting origin matches resource's allowed origin

Second issues

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江湖彼岸 2025-01-27 18:49:31

问题是因为您已经通过HTTPS协议和图像加载了站点,因此CSS和JS文件通过HTTP协议加载。

您必须在Typoscript设置配置中设置正确的协议:

config.baseURL = https://www.you-site.com/

然后,您的所有资源将通过此URL加载。

我认为CORS问题也将通过此配置解决。

The problem is because you have loaded the site through HTTPS protocol and images, CSS and JS files are loaded through HTTP protocol.

You have to set the correct protocol in TypoScript Setup configuration :

config.baseURL = https://www.you-site.com/

Then all your resources will be loaded through this URL.

I think that the CORS problem will also be solved with this configuration.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文