apache Magento 2后端MIME类型('text/html')不可执行,并且是严格MIME

bnl4lu3b  于 2023-02-24  发布在  Apache
关注(0)|答案(1)|浏览(530)

我有一个新的安装Magento(Apache在OS X上)。前端工作,但后端坏了:控制台提供Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
我有所有的.htacces文件,我有一个虚拟主机等,并尝试重新部署,清除缓存方法等没有工作。
你知道该怎么办吗?

khbbv19g

khbbv19g1#

我在Adobe Commerce Cloud项目中遇到了这个问题。以下步骤帮助我解决了这个问题Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

    • 步骤**

1.确保从更新了所需管理配置的集成或过渡环境中转储app/etc/config.php
1.然后,使用ece-tools包命令:php ./vendor/bin/ece-tools config:dump.
1.使用scp CLI命令将远程app/etc/config.php文件下载到本地计算机中。
1.然后,将该文件添加到git,应用git commit并执行git push。
1.最后,将最新的更改部署到集成-〉登台-〉生产环境。

相关问题