From d918a0fde1252ddbfa9c57dc6f196a207d65d9dc Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Tue, 13 Mar 2018 12:24:28 +0700 Subject: [PATCH] Don't do domain checking on sustainability api --- readthedocs/core/signals.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readthedocs/core/signals.py b/readthedocs/core/signals.py index 93d945bf1fb..0ea0c7f3c71 100644 --- a/readthedocs/core/signals.py +++ b/readthedocs/core/signals.py @@ -42,6 +42,9 @@ def decide_if_cors(sender, request, **kwargs): # pylint: disable=unused-argumen for url in WHITELIST_URLS: if request.path_info.startswith(url): valid_url = True + # Don't do domain checking for this API for now + if url == '/api/v2/sustainability': + return True if valid_url: project_slug = request.GET.get('project', None)