Built-in support for sentry

This commit is contained in:
Raphael Michel
2017-01-04 21:04:47 +01:00
parent b6e42d64da
commit 67de7150e5
7 changed files with 44 additions and 7 deletions

View File

@@ -30,9 +30,11 @@ class PermissionMiddleware(MiddlewareMixin):
def process_request(self, request):
url = resolve(request.path_info)
url_name = url.url_name
if not request.path.startswith(get_script_prefix() + 'control'):
# This middleware should only touch the /control subpath
return
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()))