vue可视化报表平台后台代码
您最多能選擇 25 個主題 主題必須以字母或數字為開頭,可包含連接號「-」且最長為 35 個字元。
 
 

10 行
387 B

from django.utils.deprecation import MiddlewareMixin
class SameSiteMiddleware(MiddlewareMixin):
def process_response(self, request, response):
if 'sessionid' in response.cookies:
response.cookies['sessionid']['samesite'] = 'None'
if 'csrftoken' in response.cookies:
response.cookies['csrftoken']['samesite'] = 'None'
return response