From 786a3031dde746fa64b44ed0566795ca7f10e2ee Mon Sep 17 00:00:00 2001 From: Russ Smith Date: Tue, 8 Oct 2024 16:08:55 -0700 Subject: [PATCH] Adding docs to the head of the handler file. --- src/lucky/maximum_request_size_handler.cr | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lucky/maximum_request_size_handler.cr b/src/lucky/maximum_request_size_handler.cr index 0f9fbd1ce..6a14a17f1 100644 --- a/src/lucky/maximum_request_size_handler.cr +++ b/src/lucky/maximum_request_size_handler.cr @@ -1,3 +1,15 @@ +# Allows a maximum request size to be set for incoming requests. +# +# Configure the max_size to the maximum size in bytes that you +# want to allow. +# +# ``` +# Lucky::MaximumRequestSizeHandler.configure do |settings| +# settings.enabled = true +# settings.max_size = 1_048_576 # 1MB +# end +# ``` + class Lucky::MaximumRequestSizeHandler include HTTP::Handler