问题描述
http://xxx.cn/frontend_servic...使用req.hostname获取本地调试能正常的取到localhost可是到真实环境下取到的却是frontend_service求解
问题解答
回答1:nginx的问题加下面一句就好了
proxy_set_header Host $host;

问题描述
http://xxx.cn/frontend_servic...使用req.hostname获取本地调试能正常的取到localhost可是到真实环境下取到的却是frontend_service求解
问题解答
回答1:nginx的问题加下面一句就好了
proxy_set_header Host $host;
相关文章:1. node.js - node 报错 SyntaxError: Unexpected identifier2. node.js - app.get()不执行,麻烦谁指点以下。3. node.js - utf-8数据怎么以汉字形式保存到txt文件中?4. node.js - 数据验证放到schema中还是还是controller中5. node.js - node 引入文件问题6. node.js - Linux下怎么替换Nodejs v6.x LTS为Nodejs 0.10版本7. exports - 最新版本的 node.js(7.0版) 支持 ES7 import/export 吗?怎么开启?8. node.js - 为什么要用Node,AJAX就可以访问后台APIS接口了?9. node.js - req.query is not a function10. node.js - hexo命令报错
网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主