Don't change other logic
@@ -89,8 +89,13 @@ def decide_if_cors(sender, request, **kwargs): # pylint: disable=unused-argumen
return False
- for url in ALLOWED_URLS:
+ valid_url = False
+ for url in WHITELIST_URLS:
if request.path_info.startswith(url):
+ valid_url = True
+ break
+
+ if valid_url:
project_slug = request.GET.get('project', None)
try:
project = Project.objects.get(slug=project_slug)
