Replace static files served by remote web server with local files, by plack proxy.
Perl JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Plack/App/Proxy
t
xt
.gitignore
.shipit
Changes
MANIFEST.SKIP
Makefile.PL
README

README

NAME
    Plack::App::Proxy::Selective - Proxy app that serves selected paths from
    local dir.

SYNOPSIS
      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;

DESCRIPTION
    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'.

AUTHOR
    zentooo <ankerasoy@gmail.com>

SEE ALSO
LICENSE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.