summaryrefslogtreecommitdiff
path: root/docs/ref/middleware.txt
diff options
context:
space:
mode:
authorMarissa Zhou <marissa.zhou@propylon.com>2015-06-05 16:50:53 +0100
committerTim Graham <timograham@gmail.com>2015-06-08 12:32:38 -0400
commit8b1f39a727be91aab40bdb37235718ed63ae1d50 (patch)
tree3e8fbbed5a58883851d947352ddc4eca68f5f679 /docs/ref/middleware.txt
parent167a3203b645341a3b00b878594bfd8d4dd6b040 (diff)
Fixed #24796 -- Added a hint on placement of SecurityMiddleware in MIDDLEWARE_CLASSES.
Also moved it in the project template.
Diffstat (limited to 'docs/ref/middleware.txt')
-rw-r--r--docs/ref/middleware.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt
index 8f88b6686c..d256347577 100644
--- a/docs/ref/middleware.txt
+++ b/docs/ref/middleware.txt
@@ -411,6 +411,12 @@ Middleware ordering
Here are some hints about the ordering of various Django middleware classes:
+#. :class:`~django.middleware.security.SecurityMiddleware`
+
+ It should go near the top of the list if you're going to turn on the SSL
+ redirect as that avoids running through a bunch of other unnecessary
+ middleware.
+
#. :class:`~django.middleware.cache.UpdateCacheMiddleware`
Before those that modify the ``Vary`` header (``SessionMiddleware``,