This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
import requests | |
from threading import Thread | |
URL = 'http://localhost:8003/api/temp/sleep' | |
def get(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
def SessionCookieSameSiteWorkaround(get_response): | |
def middleware(request): | |
# See: | |
# https://blog.chromium.org/2019/10/developers-get-ready-for-new.html | |
# https://github.com/django/django/pull/11894 | |
# https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients | |
# https://www.chromium.org/updates/same-site/incompatible-clients |