vue可视化报表平台后台代码
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

10 行
391 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'] = 'Strict'
if 'csrftoken' in response.cookies:
response.cookies['csrftoken']['samesite'] = 'Strict'
return response