From 9d0762722d238bd978be24b866a0ddcb31c2aa63 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Wed, 19 Mar 2025 14:21:35 +0100 Subject: [PATCH] Document the error pages dir --- README.md | 5 +++++ staticshield.py | 1 + 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 4218c8a..8ea8268 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,11 @@ server { proxy_pass http://127.0.0.1:8000; } + # Optional, when using the FLASK_ERROR_PAGES_DIR + # location /404images/ { + # alias /srv/shared/errorpages/; + # } + location /favicon.ico { alias /srv/whatever/_static/favicon.ico; } diff --git a/staticshield.py b/staticshield.py index 938504d..5e2f65f 100644 --- a/staticshield.py +++ b/staticshield.py @@ -33,6 +33,7 @@ Session(app) # Verify the required configuration # SERVE_DIR: Base dir of the files we want to serve; Flask will take care not to escape this dir # MOTHERSHIP: Mothership server and login-url, which will redirect here with a sessionstart/SEKRIT +# ERROR_PAGES_DIR: (optional) Base dir of 403.html, 404.html to show as alternative to default short error message config_vars = ['SERVE_DIR', 'MOTHERSHIP', 'ERROR_PAGES_DIR'] for config_var in config_vars: if config_var not in app.config: