summaryrefslogtreecommitdiff
path: root/django/middleware/security.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-12 20:55:32 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-14 17:50:04 +0100
commit4bb30fe5d598a7acd2a3055c5e66224cf42a75e9 (patch)
treee46ebaa8e16debbcde2eeb70ca1a9db55e8f8f27 /django/middleware/security.py
parent6b4941dd577c494cfa49dbeacfd33594ae770047 (diff)
Refs #26601 -- Made get_response argument required and don't accept None in middleware classes.
Per deprecation timeline.
Diffstat (limited to 'django/middleware/security.py')
-rw-r--r--django/middleware/security.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/middleware/security.py b/django/middleware/security.py
index d923893dc5..f27c6804b9 100644
--- a/django/middleware/security.py
+++ b/django/middleware/security.py
@@ -6,9 +6,7 @@ from django.utils.deprecation import MiddlewareMixin
class SecurityMiddleware(MiddlewareMixin):
- # RemovedInDjango40Warning: when the deprecation ends, replace with:
- # def __init__(self, get_response):
- def __init__(self, get_response=None):
+ def __init__(self, get_response):
super().__init__(get_response)
self.sts_seconds = settings.SECURE_HSTS_SECONDS
self.sts_include_subdomains = settings.SECURE_HSTS_INCLUDE_SUBDOMAINS