Plack:...Connect(3pm)

πŸ“¦
version 0.29 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’… Plack::Middleware::Proxy::Connect β€” the manual, but make it cute

okay bestie, welcome to the Plack::Middleware::Proxy::Connect page from the perl docs (manual section 3pm, if you're keeping score πŸŽ€). it's a tiny page. it's a powerful page. let's get into it ✨


🌸 NAME 🌸

Plack::Middleware::Proxy::Connect β€” bestie, it handles the CONNECT method. that's it. that's the whole name. periodt πŸ’…


✨ SYNOPSIS ✨

here's the whole vibe, copy it exactly, don't freestyle:

use Plack::Builder;
use Plack::App::Proxy;

builder {
    enable "Proxy::Connect";
    enable sub {
        my $app = shift;
        return sub {
            my $env = shift;
            ($env->{'plack.proxy.url'} = $env->{REQUEST_URI}) =~ s|^/||;
            $app->( $env );
        };
    };
    Plack::App::Proxy->new->to_app;
};

no cap, that's the setup. the enable "Proxy::Connect" line is the main character here πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. Plack::Middleware::Proxy::Connect handles the CONNECT method β€” y'know, the way mod_proxy's AllowCONNECT option does it. same energy, different era πŸ’–

and here's the important part, bestie, listen up:

Plack::Middleware::Proxy::Connect runs on servers supporting psgix.io β€” so like Twiggy, Plack::Server::Coro, and so on. if your server isn't giving psgix.io, this middleware simply cannot sit with you 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Masahiro Honma <hiratara@cpan.org> β€” thank you for your service, icon 🫑✨


🌈 SEE ALSO 🌈

  • Plack::App::Proxy β€” go read it, it's the whole reason this middleware is here, iykyk πŸ’œ

and that's the page, bestie!! this lil cutie came from perl v5.32.0, dated 2021-01-09 πŸŽ€ slay, go proxy something responsibly, mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from