Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法接受任何带有 ASP.Net WebApi 的主机头,例如:
var config = new HttpSelfHostConfiguration(http://*:8080);
我希望接受任何主机头
Webapi 似乎接受自托管服务的任何主机标头(域)。例如,如果您绑定
var config = new HttpSelfHostConfiguration(http://zzz:8080);
webapi 将接受来自
http://aaa:8080(假设 dns 指向机器)
http://aaa:8080
或者
http://localhost:8080
这不是很直观