asp.net – 如何使用Fiddler编辑HTTP请求
发布时间:2021-01-24 11:28:54 所属栏目:asp.Net 来源:互联网
导读:是否可以使用fiddler编辑HTTP请求,以便我在其他地方托管的asp.net应用程序为以下代码块返回true HttpContext.Current.Request.Url.Host == localhost 你当然可以.只需添加以下内容: if (oSession.hostname == fakelocal){oSession.hostname = localhost;oSe
是否可以使用fiddler编辑HTTP请求,以便我在其他地方托管的asp.net应用程序为以下代码块返回true HttpContext.Current.Request.Url.Host == "localhost" 解决方法你当然可以.只需添加以下内容:if (oSession.hostname == "fakelocal"){ oSession.hostname = "localhost"; oSession["x-overrideHost"] = "123.1.1.1"; // <-- Server IP here! } 然后,在客户端中使用url:http://fakelocal/whatever. Fiddler会将主机头更改为“LOCALHOST”并将请求定向到您选择的服务器IP. 当然,请注意,如果上游有代理,这将无效,因为上游代理会执行自己的DNS查找. (编辑:哈尔滨站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net – 无法加载类型’site._Default[已关闭]
- asp.net – WebFormsMVP的缺点?
- asp.net-mvc – 在EditorFor for child对象中使用时,MVC无法
- asp.net-mvc – 从控制器重定向初始化不工作
- asp.net – Request.Url.AbsoluteUri和重写的URL
- 有标签的ASP.NET WebControl吗?
- 单元测试 – 单元测试项目不能参考MVC项目
- asp.net(C#)禁止缓存文件不让文件缓存到客户端
- asp.net-mvc – 在MVC Controller中访问GET参数
- asp.net – 让Visual Studios使用子域名?
推荐文章
站长推荐
热点阅读