middleware.pyi 460 B

12345678910
  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(
  7. self, request: HttpRequest, response: HttpResponseBase
  8. ) -> HttpResponseBase: ...
  9. def build_policy(self, request: HttpRequest, response: HttpResponseBase) -> str: ...