Fixes from frontend/backend url separation (#1829)

* Fixes from frontend/backend url separation

This fixes the CORS and CSP headers.

Also, in thie commit, I removed the cors_supports_credentials config parameter,
which was recently introduced.
Instead, the logic determines the need to use CORS headers if the
web_page_url is set.

 #1778
This commit is contained in:
bmccandless
2020-09-12 10:56:31 -07:00
committed by GitHub
parent 4b240920e2
commit 6a7ae8bc8e
5 changed files with 24 additions and 14 deletions
-3
View File
@@ -341,9 +341,6 @@ def handle_api_base_url(app, app_config):
if not api_base_url:
return
if api_base_url.endswith("/"):
api_base_url = api_base_url[:-1]
sha256 = hashlib.sha256(api_base_url.encode()).hexdigest()
script_name = f"api_base_url-{sha256}.js"
script_path = os.path.join(app.root_path, "../common/web/templates", script_name)