English 中文(简体)
主机头顶顶
原标题:Host header spoofing

使用Firefox,我可以修改主机信头,以便拨打当地主机/论坛/ 将主机信头设为www.mydomain.com。

我之所以这样做,是因为我正在开发一个反向代理,当某些域被检测到时,它将执行。 一切都在起作用,几乎一切都在起作用。

代理代码检测请求并将其转换到另一个服务器, 服务器响应正确的 html 内容。 问题在于被返回的 html 引用的外部脚本文件 。 例如, 例如 :

<script type="text/javascript" src="init.js"></script>

这将导致来自用户浏览器的无威胁请求( 是否有这样的单词? ) 。

http://localhost/init.js 

通过检查这项请求,问题是主机头已恢复到当地主机,而不是www.mydomain.com。

在不更改主机文件的情况下,是否有办法设置一个主机信头,用于处理在负页时提出的所有请求?我想篡改主机信头处理最初导航中产生的所有请求。

问题回答

我的反向Proxy正在阅读主机文件 并且根据主机名的解决方式 调整请求方向

正确的方式是更改主机文件, 然后您的代理读取 Web. config 文件以获取重定向。 这只在 dev 框上。 当部署时, 主机文件不需要更改, 因为客户端会在一个远程机器上。 因此它只需要 Web. config 文件条目 。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Private FireFox plugin

I m looking at getting a FireFox plugin developed - but is it possible to create a plugin that is for private use only, so only those I share it with have it and not open to the masses? Need this for ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Cross-browser development

I m developing a web application for a new service, starting from Firefox 3.5. The interface design is tableless, only using divs + CSS & performance-blessed practices. Now, while being ...

Cross browser way of setting IFrame to "about:blank"?

Does anybody know a proper, cross-browser way to "empty" an IFrame? Is "about:blank" recognized without error across all browsers? Is it valid to give an IFrame an empty src?

热门标签