RamEx / api /middleware.py
zdy10046's picture
deploy RamEx to Hugging Face without binary files
e657e99
Raw
History Blame Contribute Delete
413 Bytes
from django.http import JsonResponse
from django.urls import resolve
from django.conf import settings
from django.utils.deprecation import MiddlewareMixin
import logging
import json
logger = logging.getLogger(__name__)
# 所有中间件已移除,因为:
# 1. CSRF验证已完全禁用,不需要CSRFExemptMiddleware
# 2. Token验证现在使用DRF的认证系统处理,不需要TokenValidationMiddleware