Skip to content
Snippets Groups Projects
Commit b99b3100 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

simplify the lookup of where to send the user

parent dfb769ac
No related branches found
No related tags found
No related merge requests found
......@@ -79,11 +79,7 @@ class MailchimpSubscribeView(FormMixin, RedirectView):
def get_success_url(self):
# Go back to where you came from, default to front page.
origin = '/'
if 'HTTP_ORIGIN' in self.request.META:
origin = self.request.META['HTTP_ORIGIN']
elif 'HTTP_REFERER' in self.request.META:
origin = self.request.META['HTTP_REFERER']
origin = self.request.META.get('HTTP_ORIGIN') or self.request.META.get('HTTP_REFERER') or '/'
# Add cache busting query string.
return origin + '?newsletter-' + uuid.uuid4().hex
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment