简体   繁体   English

节点js无法仅为移动客户端提供服务

[英]node js fails to serve mobile clients only

I have a node js server on a docker container runing on digital ocean, that serve an angular 2 application bundeled and traspiled with webpack. 我在运行在数字海洋上的docker容器上有一个节点js服务器,该服务器为通过webpack捆绑和移植的angular 2应用程序提供服务。 When I try to get the application from any computer it works, but if I try to get it from my android device or ipad it fails to load the js files. 当我尝试从任何计算机上获取应用程序时都可以运行,但是如果尝试从我的android设备或ipad上获取应用程序,则无法加载js文件。

The browsers shows this errors: 浏览器显示以下错误:

Failed to load resource: net::ERR_CONNECTION_REFUSED common.js
Failed to load resource: net::ERR_CONNECTION_REFUSED vendor.js
Failed to load resource: net::ERR_CONNECTION_REFUSED app.js

Again it works on desktop chrome/firefox/safari. 再次适用于台式机chrome / firefox / safari。

Did you check if you has AdBlock or something similar in your devices? 您是否检查过设备中是否装有AdBlock或类似产品? Sometimes it can cause errors like this. 有时,它可能会导致类似这样的错误。

Check too if you are using a proxy in the devices connection. 还要检查是否在设备连接中使用代理。

I hope my answer will be helpfulp! 希望我的回答对您有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM