Kazuhiro Osawa

NAME

HTTP::Engine::Middleware::ReverseProxy - reverse-proxy support

SYNOPSIS

    # default proxy server is 127.0.0.1
    my $mw = HTTP::Engine::Middleware->new;
    $mw->install(qw/ HTTP::Engine::Middleware::ReverseProxy /);
    HTTP::Engine->new(
        interface => {
            module => 'YourFavoriteInterfaceHere',
            request_handler => $mw->handler( \&handler ),
        }
    )->run();

    # allowd proxy server is 192.168.0.0/24
    my $mw = HTTP::Engine::Middleware->new;
    $mw->install( 'HTTP::Engine::Middleware::ReverseProxy', { allowed_remote => qr/\A192\.168\.0\.\d+\z/ } );
    # or $mw->install( 'HTTP::Engine::Middleware::ReverseProxy', { allowed_remote => '192\.168\.0\.\d+' } );
    HTTP::Engine->new(
        interface => {
            module => 'YourFavoriteInterfaceHere',
            request_handler => $mw->handler( \&handler ),
        }
    )->run();

DESCRIPTION

This module resets some HTTP headers, which changed by reverse-proxy.

AUTHORS

yappo




Hosting generously
sponsored by Bytemark