View on
MetaCPAN
Naosuke Yokoe > Plack-App-Proxy-Selective-0.10 > Plack::App::Proxy::Selective

Download:
Plack-App-Proxy-Selective-0.10.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.10   Source  

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.

syntax highlighting: