Skip to content
Snippets Groups Projects
Commit 2bb8bd7a authored by Mickael Desfrenes's avatar Mickael Desfrenes
Browse files

increase proxy pool size

parent ce666e23
Branches
No related merge requests found
Pipeline #311736 passed with stage
in 4 minutes and 35 seconds
from os import environ from os import environ
import urllib3
from django.conf import settings from django.conf import settings
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from django.http.response import HttpResponseForbidden from django.http.response import HttpResponseForbidden
...@@ -58,6 +59,10 @@ class IIIFProxyView(ProxyView): ...@@ -58,6 +59,10 @@ class IIIFProxyView(ProxyView):
upstream = environ.get("IIIF_UPSTREAM_URL", "http://localhost:8182/iiif/") upstream = environ.get("IIIF_UPSTREAM_URL", "http://localhost:8182/iiif/")
add_x_forwarded = True 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): def dispatch(self, request, *args, **kwargs):
try: try:
response = JWT_authenticator.authenticate(request) response = JWT_authenticator.authenticate(request)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment