forked from rDrama/rDrama
1
0
Fork 0

remove ipinfo

master
Aevann 2024-02-08 01:47:20 +02:00
parent 2e436dfba8
commit e8548fed26
1 changed files with 0 additions and 17 deletions

View File

@ -445,20 +445,3 @@ def donate(v):
@auth_required
def orgy(v):
return redirect("/chat")
if SITE == 'watchpeopledie.tv':
import ipinfo
access_token = environ.get("IPINFO_TOKEN").strip()
handler = ipinfo.getHandler(access_token)
@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)
def geoblock():
ip = request.headers.get("X-Forwarded-For")
country = handler.getDetails(ip).country
if country == 'AU':
abort(403, "This video is blocked in Australia.")
return send_file('/videos/1706708037797343.mp4')