Skip to content

Commit

Permalink
302 Temporary redirect, NOT 301 Permanent
Browse files Browse the repository at this point in the history
Permanent redirects are dangerous, because they are cached by browsers and it is easy to end up having a redirect loop for some users.
  • Loading branch information
stefanfoulis committed Dec 21, 2015
1 parent 320f6f4 commit 3b95705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aldryn_sites/middleware.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.conf import settings
from django.http import HttpResponsePermanentRedirect
from django.http import HttpResponseRedirect
from . import utils


Expand Down Expand Up @@ -34,4 +34,4 @@ def process_request(self, request):
redirect_url = utils.get_redirect_url(current_url,
config=site_config, https=self.secure_redirect)
if redirect_url:
return HttpResponsePermanentRedirect(redirect_url)
return HttpResponseRedirect(redirect_url)

0 comments on commit 3b95705

Please sign in to comment.