caching: fix CSRF
this removes the ability to do a GET to dump the internal cache but i've added a button to the admin panel that makes it so you can do it
This commit is contained in:
parent
387f5e4f62
commit
7970b17574
2 changed files with 3 additions and 2 deletions
|
@ -1531,7 +1531,7 @@ def admin_distinguish_comment(c_id, v):
|
|||
if comment.distinguish_level: return {"message": "Comment distinguished!"}
|
||||
else: return {"message": "Comment undistinguished!"}
|
||||
|
||||
@app.get("/admin/dump_cache")
|
||||
@app.post("/admin/dump_cache")
|
||||
@limiter.exempt
|
||||
@admin_level_required(2)
|
||||
def admin_dump_cache(v):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue