Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always auto redirect to localhost in development #9

Open
afc163 opened this issue Apr 1, 2016 · 7 comments
Open

Always auto redirect to localhost in development #9

afc163 opened this issue Apr 1, 2016 · 7 comments

Comments

@afc163
Copy link
Contributor

afc163 commented Apr 1, 2016

本地路径使用 ip 进行访问时:http://{ip}:7001/

会自动跳转到 http://localhost:7001/ 导致无法分享链接。

@sailxjx
Copy link
Member

sailxjx commented Apr 1, 2016

@afc163 跳转路径是通过配置文件确定的
如果需要使用 ip,搜一下 talk-api2x/talk-web/talk-account/talk-snapper 下面的 config 文件夹,把所有 localhost 换成 ip 就行了

@afc163
Copy link
Contributor Author

afc163 commented Apr 1, 2016

看了下有很多,localhostlocalhost:7001http://localhost:7001 这样的配置。希望跳转时不要替换域名,只替换路径,这样可以任意更换机器或各自绑定 hosts 。

@niuba
Copy link

niuba commented Apr 1, 2016

建议在default config下搞一个通用域名变量配置,如果合适,可以提交一个pr

@sailxjx
Copy link
Member

sailxjx commented Apr 2, 2016

配置固定域名是因为应用中有内部 http 请求的地方,比如从 api 请求 account。欢迎 PR

@m430
Copy link

m430 commented Jul 18, 2016

这个问题我也遇到了,把-talk-os部署到服务器后,在本地访问服务器IP然后就自动重定向到localhost的domain,致使无法正常访问。

@supershy77
Copy link

supershy77 commented Jul 28, 2016

@sailxjx ip已改成服务器地址,奇怪的是
mac和手机通过浏览器访问是正常的。
windows 浏览器登陆后在IP:7001就不动了,而且没有报错

node版本 v4.2.6
npm版本 2.14.12

@kathy66hui
Copy link

@sailxjx 在config底下的文件都改成ip了,还是不能访问。服务器端不报错,客户端console显示的vendor的地址还是localhost。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants