Build Status

NAME

Plack::App::Vhost - Simple virtual host implementation on Plack.

SYNOPSIS

use Plack::App::Vhost;

Plack::App::Vhost->new(
   vhosts => [
      qr/^foo-mode\.my-app/ => $foo_app,
      qr/^bar-mode\.my-app/ => $bar_app,
   ],
   fallback => sub {
       my $env = shift;
       open my $fh, '<', 'path/to/404.html';
       return [404, ['Content-Type' => 'text/html', 'Content-Length' => -s $fh], [$fh]];
   },
)->to_app;

DESCRIPTION

Plack::App::Vhost is virtual host implementation on Plack.

METHODS

SEE ALSO

Plack::App::HostMap

LICENSE

Copyright (C) karupanerura.

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

AUTHOR

karupanerura karupa@cpan.org