在http请求中拦截并使用本地文件

在http请求中拦截并使用本地文件

本文介绍了在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。我可以更改hosts文件以重定向到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...

(。*) - > / home / user / localcss / $ 1

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

有人有任何建议吗?

编辑:重定向澄清

推荐答案

有这个特征;只需单击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请求中拦截并使用本地文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 13:39