Plack::App::Proxy::Selective - Proxy app that serves selected paths from local dir.
use Plack::App::Proxy::Selective; use Path::Class; Plack::App::Proxy::Selective->new( filter => +{ 'google.com' => +{ '/style' => 'css', }, 'www.yahoo.co.jp' => +{ 'js' => 'script', } }, base_dir => file(__FILE__)->dir, )->to_app;
Plack::App::Proxy::Selective behave as proxy that serves files from local disk, instead of some proxied remote files. You can specify hosts, remote path and local directory with 'filter' param as hash reference. Hosts and remote path can include regular expressions like '/script/.*' or 'script/.*.js'.
zentooo <ankerasoy@gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Plack::App::Proxy::Selective, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::App::Proxy::Selective
CPAN shell
perl -MCPAN -e shell install Plack::App::Proxy::Selective
For more information on module installation, please visit the detailed CPAN module installation guide.