拦截并使用http请求中的本地文件 [英] Intercept and use local files in http requests

查看:26
本文介绍了拦截并使用http请求中的本地文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试寻找一种工具,允许非程序员在实时服务器上测试文件.

I'm trying to find a tool that will allow non-programmers to test files on a live server.

例如,他们可以修改计算机上的图像,重新加载网页,然后立即查看工作结果.

For example, they could modify an image on their computer, reload a webpage, then see the results of their work immediately.

我已经尝试为此找到一个工具,因为这似乎很明显以至于有人肯定已经想到了它,但是我看到的很多软件都不太适合.一个名为 Fiddler 的工具可以做到这一点(他们称之为自动响应),但它仅适用于 Windows.我可以更改主机文件以重定向到 nginx 或其他东西的本地实例,但是当我真正想要的是一个简单的工具时,这似乎很难维护......

I've tried finding a tool for this, because it seems obvious enough that someone must've thought of it, but a lot of software I see doesn't quite fit. A tool called Fiddler does this (they call it autoresponding) but it's Windows-only. I could change the hosts file to redirect to a local instance of nginx or something, but that seems difficult to maintain when all I really want is a simple tool that will something like this...

http://someserver.com/css/(.*) ->/home/user/localcss/$1

http://someserver.com/css/(.*) -> /home/user/localcss/$1

大家有什么推荐的吗?

编辑:重定向说明

推荐答案

Fiddler 有这个功能;只需单击 AutoResponder 选项卡并将 URL 映射到本地文件.每天都有成千上万的人这样做.

Fiddler has this feature; just click the AutoResponder tab and map URLs to local files. Thousands of people do this every day.

另见此处的视频 #5:http://www.fiddlerbook.com/fiddler/help/视频/default.asp

See also video #5 here: http://www.fiddlerbook.com/fiddler/help/video/default.asp

这篇关于拦截并使用http请求中的本地文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆