1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00
This commit is contained in:
lando814 2025-05-20 16:51:43 +03:00 committed by GitHub
commit 8d688e7f83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,3 +19,13 @@ class ExceptionMiddleware:
)
return render(request, "500.html", status=500)
# TODO: check connecting to host via VPN
class DisableCSRFMiddleware(object):
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
setattr(request, '_dont_enforce_csrf_checks', True)
response = self.get_response(request)
return response