From 65d85c5991b30eb47ba8b3252a40b5d38bade016 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 1 Feb 2024 21:46:25 +0200 Subject: [PATCH] geoblock --- files/routes/static.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/files/routes/static.py b/files/routes/static.py index cb390980d..aea119ee6 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -432,3 +432,13 @@ def donate(v): @auth_required def orgy(v): return redirect("/chat") + +if SITE == 'watchpeopledie.tv': + @app.get("/1706708037797343.mp4") + @limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400) + @limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID) + @auth_required + def geoblock(v): + if request.headers.get("Cf-Ipcountry") == 'AU': + abort(403) + return send_file('/videos/1706708037797343.mp4')