Add def allow_cw

pull/220/head
G-tix 2023-12-21 19:49:32 +00:00
parent cfa28c49d0
commit 5edc13256a
1 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,14 @@ def error_500(e):
return error(e)
@app.post("/allow_cw")
@limiter.limit('1/second', scope=rpath)
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
def allow_cw():
session["cw_cookies"] = int(time.time()) + 3600
redir = request.values.get("redir", "/")
return ''
@app.post("/allow_nsfw")
@limiter.limit('1/second', scope=rpath)
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)