From 2bb8bd7a666d654b8ec966d8203755e47eceb5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Desfr=C3=AAnes?= <mickael.desfrenes@unicaen.fr> Date: Thu, 19 Dec 2024 08:26:41 +0100 Subject: [PATCH] increase proxy pool size --- pount/apps/iiif/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pount/apps/iiif/views.py b/pount/apps/iiif/views.py index 00c98a41..8a21ecc0 100644 --- a/pount/apps/iiif/views.py +++ b/pount/apps/iiif/views.py @@ -1,5 +1,6 @@ from os import environ +import urllib3 from django.conf import settings from django.contrib.auth import get_user_model from django.http.response import HttpResponseForbidden @@ -58,6 +59,10 @@ class IIIFProxyView(ProxyView): upstream = environ.get("IIIF_UPSTREAM_URL", "http://localhost:8182/iiif/") add_x_forwarded = True + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.http = urllib3.PoolManager(maxsize=100) + def dispatch(self, request, *args, **kwargs): try: response = JWT_authenticator.authenticate(request) -- GitLab