From 775f0d07172f30579b8e3365928f492074590689 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Sun, 13 Nov 2022 01:02:25 -0600 Subject: [PATCH] no step on jc --- files/__main__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/files/__main__.py b/files/__main__.py index c40a11d3e..9688f3a8b 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -127,6 +127,13 @@ def teardown_request(error): del g.db stdout.flush() +@limiter.request_filter +def no_step_on_jc(): + if request: + key = environ.get("NO_STEP_ON_JC", "") + if key and key == request.headers.get("X-No-Step", ""): return True + return False + if "load_chat" in argv: from files.routes.chat import * else: