  builder {
      enable "ReverseProxy";
      enable "Plack::Middleware::Static";
-@@ -86,4 +95,42 @@ builder {
-     mount '/intranet'      => $intranet;
-     mount '/api/v1/app.pl' => $apiv1;
+@@ -82,6 +91,45 @@ builder {
+     enable "+Koha::Middleware::SetEnv";
+     #enable "+Koha::Middleware::Session";
 
 +    enable sub {
 +        my $app = shift;

+
+1;
diff --git a/debian/templates/plack.psgi b/debian/templates/plack.psgi
index b5d764c..eab3c94 100644
--- a/debian/templates/plack.psgi
+++ b/debian/templates/plack.psgi
@@ -75,6 +75,15 @@ my $apiv1  = builder {

+            return $res;
+        };
+    };
+
     mount '/opac'          => $opac;
     mount '/intranet'      => $intranet;
     mount '/api/v1/app.pl' => $apiv1;
