Repair styles and reports

This commit is contained in:
Greg 2025-05-17 14:22:14 +02:00
parent 435fbd4486
commit b612b23340

20
app.py
View File

@ -15,7 +15,25 @@ app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY', 'change-this-secret-key'
csrf = CSRFProtect(app) csrf = CSRFProtect(app)
# Security Headers # Security Headers
Talisman(app) csp = {
'default-src': [
"'self'"
],
'script-src': [
"'self'",
'https://cdn.jsdelivr.net/npm/chart.js',
"'unsafe-inline'"
],
'style-src': [
"'self'",
"'unsafe-inline'"
],
'img-src': [
"'self'",
'data:'
]
}
Talisman(app, content_security_policy=csp)
# Logging Configuration # Logging Configuration
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s') logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s')