book / HTTP-Proxy

A pure Perl HTTP proxy
http://search.cpan.org/dist/HTTP-Proxy/
19 stars 14 forks source link

added support for simple redirect of url, man in the middle style. #2

Open hernan604 opened 12 years ago

hernan604 commented 12 years ago

Hi Book, im br dev, i use your lib to debug some js and css on production websites.. so i activate the proxy and configure as below.. and just open the page and tada! it makes easier to debug css/js in prod servers without touching the real files. If you are interested on this solution accept the pull request, and you can add your changes.

Example of configuration:

use HTTP::Proxy;
my $proxy = HTTP::Proxy->new( port => 13128 );
$proxy->stash( redirects => {
  'http://www.google.com/' => 'http://www.yahoo.com/',
} );
$proxy->start;
1;

Hope we can talk soon, see you, tks