Perlba...tLength(3pm)

πŸ“¦
version 1.80 Β· 6 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

Perlbal::Plugin::MaxContentLength β€” bestie, this is the plugin that says no to big requests. It rejects large requests, periodt. πŸ›‘


✨ SYNOPSIS ✨

okay so here's the vibe, copy it exactly:

LOAD MaxContentLength
CREATE SERVICE cgilike
    # define a service...
    SET max_content_length  = 100000
    SET plugins             = MaxContentLength
ENABLE cgilike

like. that's it. that's the whole setup. slay. πŸ’…


🌸 DESCRIPTION 🌸

So this module is the bouncer at the club 🫢 β€” it rejects requests that are bigger than a limit you configure. You set the limit, it enforces the limit. No cap.

Specifically: if a request rolls up carrying a Content-Length header, and that header's value is bigger than the max_content_length value, the request gets rejected. Not gently. It gets a 413 "Request Entity Too Large" error. that's the moment. iconic behaviour honestly. πŸ’€βœ¨

So yeah β€” set max_content_length, load the plugin, and watch it turn away the giant requests with a little 413 and zero remorse. main character energy fr fr. πŸ‘‘


πŸŽ€ AUTHOR πŸŽ€

Adam Thomason, <athomason@sixapart.com> πŸ’œ


Copyright 2008 Six Apart Ltd.

This module is part of the Perlbal distribution, and as such can be distributed under the same licence terms as the rest of Perlbal. πŸ“œβœ¨


okay and that's the whole page, bestie!! this lil doc was built for perl v5.34.0 and dated 2022-06-28, and yes, that's Perlba...tLength(3pm) β€” the name got a lil truncated in the header, we don't talk about it πŸ˜­πŸ¦‹ mwah, go forth and reject those chonky requests πŸ’–πŸŒΈ

πŸ“¦ where this page comes from