File: security.pyi

package info (click to toggle)
python-django-stubs 5.2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,832 kB
  • sloc: python: 5,185; makefile: 15; sh: 8
file content (17 lines) | stat: -rw-r--r-- 645 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from typing import Any

from django.http.request import HttpRequest
from django.http.response import HttpResponse, HttpResponsePermanentRedirect
from django.utils.deprecation import MiddlewareMixin

class SecurityMiddleware(MiddlewareMixin):
    sts_seconds: int
    sts_include_subdomains: bool
    sts_preload: bool
    content_type_nosniff: bool
    xss_filter: bool
    redirect: bool
    redirect_host: str | None
    redirect_exempt: list[Any]
    def process_request(self, request: HttpRequest) -> HttpResponsePermanentRedirect | None: ...
    def process_response(self, request: HttpRequest, response: HttpResponse) -> HttpResponse: ...