Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

take out redirect

  • Loading branch information...
commit f050c072246e84d3f6bdba50fe6dc553488d23e0 1 parent cef36f7
@wanderer authored
Showing with 0 additions and 20 deletions.
  1. +0 −20 occupywallst/middleware.py
View
20 occupywallst/middleware.py
@@ -65,23 +65,3 @@ def process_request(self, request):
data = request.POST.copy()
data['recaptcha_magic_ip_field'] = request.META['REMOTE_ADDR']
request.POST = data
-
-class DomainsAliasMiddleware:
- '''
- Redirect to Site 'domain' if target domain found in DOMAINS_ALIAS
- '''
- def process_request(self, request):
- target_domain = request.META.get("HTTP_HOST", "localhost")
- if hasattr(settings, 'DOMAINS_ALIAS'):
- for domain in settings.DOMAINS_ALIAS:
- if domain == target_domain:
- return self._redirect(request)
- return None
-
- def _redirect(self, request):
- if request.path == "": request.path = "/"
- newurl = "%s://%s%s" % (request.is_secure() and 'https' or 'http', \
- settings.OWS_SITE_NAME, request.path)
- if request.GET:
- newurl += '?' + request.GET.urlencode()
- return HttpResponseRedirect(newurl)
Please sign in to comment.
Something went wrong with that request. Please try again.