Project

General

Profile

Actions

Feature #1299

closed

API: Setting for CORS allowance in UI

Added by Bernhard Koschiček-Krombholz almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Start date:
2020-07-07
Estimated time:

Description

There is now flask-cors implemented in the backend code. We use a decorator for the /api/ route to handle CORS. To specify, which sites are allowed to pull data from the /api/, a global variable in default.py named CORS_ALLOWANCE = '*' was created. So for now, people can change the CORS allowance through the production.py, where they can set CORS_ALLOWANCE to * (asterisk) to allow any sites or specify one or more sites with a string, regex or a list (cf. https://flask-cors.readthedocs.io/en/latest/api.html#decorator).

So for an easier usage, it would be nice to have the possibility to modify this also in the UI.

Wiki page: CORS

Actions

Also available in: Atom PDF