wersja 0.0.4 #7

Merged
gru merged 47 commits from zliczanie_wydatkow_i_poprawki_w_js into master 2025-07-28 22:17:13 +02:00
Showing only changes of commit d8d786aed8 - Show all commits

6
app.py
View File

@@ -63,6 +63,10 @@ logging.getLogger("werkzeug").setLevel(logging.INFO)
app = Flask(__name__)
app.config.from_object(Config)
# wykluczenie /healthcheck z talisman
def csp_exempt(path):
return path == "/healthcheck"
# Konfiguracja nagłówków bezpieczeństwa z .env
csp_policy = None
if app.config.get("ENABLE_CSP", True):
@@ -86,6 +90,7 @@ talisman = Talisman(
content_security_policy=csp_policy,
x_content_type_options=app.config.get("ENABLE_XCTO", True),
strict_transport_security_include_subdomains=False,
skip_if=csp_exempt
)
register_heif_opener() # pillow_heif dla HEIC
@@ -2223,7 +2228,6 @@ def recalculate_filesizes():
@app.route("/healthcheck")
@talisman.exempt
def healthcheck():
header_token = request.headers.get("X-Internal-Check")
correct_token = app.config.get("HEALTHCHECK_TOKEN")