Skip to content

Commit

Permalink
feat(config): make APP_DEFAULT_SECURE_HEADERS customisable (#713)
Browse files Browse the repository at this point in the history
Allow customisation of the `APP_DEFAULT_SECURE_HEADERS_ configuration
value, to be able to configure Flask-Talisman's security mechanisms.
  • Loading branch information
mdonadoni committed Nov 22, 2024
1 parent 5b6c276 commit 1919358
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions reana_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ def _(x):
PROXYFIX_CONFIG = json.loads(os.getenv("PROXYFIX_CONFIG", '{"x_proto": 1}'))

APP_DEFAULT_SECURE_HEADERS["content_security_policy"] = {}
APP_DEFAULT_SECURE_HEADERS.update(
json.loads(os.getenv("APP_DEFAULT_SECURE_HEADERS", "{}"))
)
if "REANA_FORCE_HTTPS" in os.environ:
APP_DEFAULT_SECURE_HEADERS["force_https"] = bool(
strtobool(os.getenv("REANA_FORCE_HTTPS"))
)

APP_HEALTH_BLUEPRINT_ENABLED = False


Expand Down

0 comments on commit 1919358

Please sign in to comment.