From 2233effc9a9dc6ce39a1501dd59028ade7851138 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 29 Mar 2024 18:09:30 +0000 Subject: [PATCH] Bug 36149: (follow-up) POD and tidy MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Kyle M Hall (cherry picked from commit 31943a5781aaaa9803ca87247eb7a663fb999fc5) Signed-off-by: Fridolin Somers (cherry picked from commit 0534259c2cbdbb9d6e0ad56535d0c000eea3a629) Signed-off-by: Frédéric Demians --- Koha/Middleware/UserEnv.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Koha/Middleware/UserEnv.pm b/Koha/Middleware/UserEnv.pm index 03d515fdcf..ab67fab913 100644 --- a/Koha/Middleware/UserEnv.pm +++ b/Koha/Middleware/UserEnv.pm @@ -5,8 +5,20 @@ use parent qw(Plack::Middleware); use C4::Context; +=head1 NAME + +Koha::Middleware::UserEnv - Middleware to ensure fresh userenv in all requests + +=head1 METHODS + +=head2 call + +This method is called for each request, and will unset the userenv to avoid contamination between requests. + +=cut + sub call { - my ( $self, $env ) =@_; + my ( $self, $env ) = @_; my $req = Plack::Request->new($env); -- 2.39.5