restore /csp_violations

pull/110/head
Aevann 2023-02-02 22:15:03 +02:00
parent 6e389bccc7
commit 28dbece47e
1 changed files with 11 additions and 11 deletions

View File

@ -356,14 +356,14 @@ def donate(v):
return render_template(f'donate_{SITE_NAME}.html', v=v) return render_template(f'donate_{SITE_NAME}.html', v=v)
# @app.post('/csp_violations') @app.post('/csp_violations')
# @limiter.limit("5/minute;10/day") @limiter.limit("5/minute;10/day")
# def csp_violations(): def csp_violations():
# content = request.get_json(force=True)['csp-report'] content = request.get_json(force=True)['csp-report']
# if content.get('source-file').startswith(SITE_FULL): if content.get('source-file') and content['source-file'].startswith(SITE_FULL):
# print('--------', flush=True) print('--------', flush=True)
# for k, val in content.items(): for k, val in content.items():
# if k != 'original-policy': if k != 'original-policy':
# print(f"{k}: {val}", flush=True) print(f"{k}: {val}", flush=True)
# print('--------', flush=True) print('--------', flush=True)
# return '' return ''