diff --git a/frappe/app.py b/frappe/app.py index 29ef69ef2d..784db3d976 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -152,10 +152,10 @@ def process_response(response): def set_cors_headers(response): origin = frappe.request.headers.get('Origin') - if not origin: + allow_cors = frappe.conf.allow_cors + if not (origin and allow_cors): return - allow_cors = frappe.conf.allow_cors if allow_cors != "*": if not isinstance(allow_cors, list): allow_cors = [allow_cors]