Use more caching in multidomain module

This commit is contained in:
Raphael Michel
2016-11-08 16:03:06 +01:00
parent d2ce002305
commit 6adcf4bc7c
4 changed files with 24 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ class PermissionMiddleware(MiddlewareMixin):
if not request.path.startswith(get_script_prefix() + 'control'):
# This middleware should only touch the /control subpath
return
if hasattr(request, 'domain'):
if hasattr(request, 'organizer'):
# If the user is on a organizer's subdomain, he should be redirected to pretix
return redirect(urljoin(settings.SITE_URL, request.get_full_path()))
if url_name in self.EXCEPTIONS: