-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: add mypy stubs for django-csp (#54786)
upstream seems not super active so I sent an issue there and I'm going to plop stubs here for now mozilla/django-csp#198
- Loading branch information
1 parent
387f1eb
commit 4fd9e33
Showing
3 changed files
with
8 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.http.request import HttpRequest | ||
from django.http.response import HttpResponseBase | ||
from django.utils.deprecation import MiddlewareMixin | ||
|
||
class CSPMiddleware(MiddlewareMixin): | ||
def process_request(self, request: HttpRequest) -> None: ... | ||
def process_response(self, request: HttpRequest, response: HttpResponseBase) -> HttpResponseBase: ... | ||
def build_policy(self, request: HttpRequest, response: HttpResponseBase) -> str: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters