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

Host Header 功能异常 #248

Closed
tldzyx opened this issue Feb 6, 2017 · 3 comments
Closed

Host Header 功能异常 #248

tldzyx opened this issue Feb 6, 2017 · 3 comments
Labels
Milestone

Comments

@tldzyx
Copy link

tldzyx commented Feb 6, 2017

主机要求域名为 http://localhost:35381/

没错这是ASP.NET MVC站点通过IIS Express开发调试


frpc配置文件

[x_web]
privilege_mode = true
type = http
local_ip = 127.0.0.1
local_port = 35381
host_header_rewrite = localhost
subdomain = mvc

结果怎么也打不开,通过抓包分析请求,内容是这样的

GET / HTTP/1.1
Host: localhost:.com:35381
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8,en;q=0.6

于是错误出现了
Host: localhost:.com:35381
本应替换成localhost的主机名替换成了localhost:.com

@fatedier
Copy link
Owner

还能提供 hostname, 请求的 URL 吗?

@tohitsugu
Copy link

Use a public domain that always resolves to localhost, such as planetaryassaultsystem.com

@tohitsugu
Copy link

tohitsugu commented Jul 16, 2017 via email

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

No branches or pull requests

3 participants