Repair styles and reports
This commit is contained in:
parent
435fbd4486
commit
b612b23340
20
app.py
20
app.py
@ -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')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user