nginx代理未加载CSS并导致http代码400

时间:2018-11-01 03:50:50

标签: http nginx

我在Heroku中部署了nginx,我根据请求将请求代理到多个应用程序。 Nginx除了代理我的请求外没有做任何其他事情。但是,一个代理导致以下结果:

Refused to execute script from 'https://app.com/assets/application-######.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

做了一些谷歌搜索,建议的解决方案导致:

GET https://app.com/favicon.ico 400 (Bad Request)

建议添加的nginx配置为:

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;

请注意,我的nginx知识还很新,几乎所有资源都在暗示着同样的事情,但到目前为止我却一无所获。我只想知道是什么原因导致此类错误的发生。

0 个答案:

没有答案