comment /csp_violations again
parent
97ec2acadc
commit
df1f2792a1
|
@ -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') and content['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 ''
|
||||||
|
|
Loading…
Reference in New Issue