问题描述
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 - socket.io官网为什么访问不了2. node.js - 如何让nodejs应用forever自动重启?3. node.js - 上百(有限张)图片,需要在NodeJS中使用,如何最有效的利用内存4. node.js - 【mongodb · mongoose】错误 "Topology was destroyed" 怎么解决?5. node.js - nodejs ioredis All sentinels are unreachable6. node.js - 在使用github pages和hexo搭建网站时,为什么会出现图片资源加载失败?7. node.js -【node】在node中如何打开当前系统已经安装的某个应用?8. node.js - RESTFUL API 除了简单的对TABLE CRUD以外,其他的功能该如何命名?9. node.js - centos7下用yum install 安装nodejs,默认装在哪个目录了?10. node.js - node pm2 如何防止项目误重启删除呢?
网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主