Perlba...Extras(3pm)
π Perlbal::Plugin::XFFExtras π
okay so bestie, this is Perlbal::Plugin::XFFExtras, and it lives in the User Contributed Perl Documentation corner of the 3pm section (iykyk π«Ά). it's a Perlbal plugin that can optionally add an X-Forwarded-Port and/or X-Forwarded-Proto header to reverse proxied requests. that's it. that's the whole vibe. β¨
πΈ NAME πΈ
Perlbal::Plugin::XFFExtras β a Perlbal plugin that can <highkey>optionally</highkey> add an X-Forwarded-Port and/or an X-Forwarded-Proto header to reverse proxied requests. π
π¦ SYNOPSIS π¦
drop this in your perlbal.conf, no notes:
# in perlbal.conf
LOAD XFFExtra
CREATE POOL web
POOL web ADD 10.0.0.1:80
CREATE SERVICE proxy
SET role = reverse_proxy
SET listen = 0.0.0.0:80
SET pool = web
SET plugins = XFFExtras
SET send_backend_port = yes
SET send_backend_proto = yes
ENABLE proxy
β¨ DESCRIPTION β¨
so the way this works is: this plugin adds optional headers that get sent to your backend servers when you're in reverse proxy mode. that's the entire job description bestie, and it does it flawlessly. π
π HEADERS π
X-Forwarded-Portβ this header is gonna hold an integer value telling you which port the peer connected to. and like, that number? it corresponds to the port number you specified on thelistenline of the perlbal service that initially handled the connection. so it's the original port, not some random one. periodt. πX-Forwarded-Protoβ this one holds a string telling you which protocol the client used to connect to perlbal. and rn, currently, it's gonna be either'http'or'https'. those are the only two options, that's the whole menu. π
π AUTHOR π
Jonathan Steinert, <hachi@kuiki.net> π
π COPYRIGHT AND LICENSE π
Copyright (C) 2012 by Say Media Inc, <cpan@saymedia.com> πΈ
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available. π«Ά
okay and that's the whole page bestie!! this was documented with perl v5.34.0 and it's dated 2022-06-28, so it's giving vintage but still iconic β¨ go forth and forward those headers, you absolute main character π
π
π¦ where this page comes from
- debian bookworm: libperlbal-perl 1.80-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libperlbal-perl 1.80-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libperlbal-perl 1.80-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libperlbal-perl 1.80-4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms