简体   繁体   English

网站无法在手机上加载内容

[英]Website does not load content on mobile

I built a web site by using Angular 2, NodeJS and Firebase and it works perfectly on localhost , however after I hosted it on Heroku ( link ) it isn't working on mobiles website. 我使用Angular 2,NodeJS和Firebase构建了一个网站,该网站在localhost ,但是将其托管在Heroku( 链接 )上后,它无法在手机网站上运行。 Does any one know what is the problem? 有谁知道这是什么问题吗?

If you need some code I have it as well, can attach that part which you will need. 如果您需要一些代码,我也有,可以附加您需要的部分。

Thank you every one , i forgot middleware 谢谢大家,我忘了中间件

app.use(function (req , res ,next) {
  res.setHeader('Access-Control-Allow-Origin' , '*');
  res.setHeader('Access-Control-Allow-Methods' , '*');
  next();

});

so it was reason why i could not access the page 所以这就是为什么我无法访问该页面的原因

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

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