mirror of
https://github.com/pinry/pinry.git
synced 2025-11-13 16:45:41 +01:00
Fix: Try to migrate middlware to new version
This commit is contained in:
@@ -2,6 +2,10 @@ from django.middleware.csrf import get_token
|
||||
|
||||
|
||||
class ForceCSRFCookieMiddleware:
|
||||
|
||||
def __init__(self, get_response):
|
||||
self.get_response = get_response
|
||||
|
||||
def process_request(self, request):
|
||||
if "CSRF_TOKEN" not in request.META:
|
||||
get_token(request)
|
||||
|
||||
Reference in New Issue
Block a user