forked from MarseyWorld/MarseyWorld
fix 500 error
parent
dfb30afbc6
commit
17a7430193
|
@ -361,8 +361,11 @@ items_we_want = ('blocked-uri', 'document-uri', 'effective-directive', 'source-f
|
||||||
@limiter.limit("10/minute;50/day")
|
@limiter.limit("10/minute;50/day")
|
||||||
def csp_violations():
|
def csp_violations():
|
||||||
content = json.dumps(request.get_json())
|
content = json.dumps(request.get_json())
|
||||||
if content["source-file"].startswith(SITE_FULL):
|
try:
|
||||||
print('--------', flush=True)
|
if content["source-file"].startswith(SITE_FULL):
|
||||||
for i in items_we_want:
|
print('--------', flush=True)
|
||||||
print(f"{i}: {content['i']}")
|
for i in items_we_want:
|
||||||
|
print(f"{i}: {content['i']}", flush=True)
|
||||||
|
except:
|
||||||
|
print(content, flush=True)
|
||||||
return ''
|
return ''
|
||||||
|
|
Loading…
Reference in New Issue