middleware.pyi 446 B

12345678
  1. from django.http.request import HttpRequest
  2. from django.http.response import HttpResponseBase
  3. from django.utils.deprecation import MiddlewareMixin
  4. class CSPMiddleware(MiddlewareMixin):
  5. def process_request(self, request: HttpRequest) -> None: ...
  6. def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ...
  7. def build_policy(self, request: HttpRequest, response: HttpResponseBase) -> str: ...