forked from rDrama/rDrama
fix host bug, do a absolute redirect instead of a relative one, and make wpdco page essentially static
parent
96d63ed5de
commit
be6fa59e13
|
@ -74,7 +74,6 @@ if not path.isfile(f'/site_settings.json'):
|
|||
|
||||
@app.before_request
|
||||
def before_request():
|
||||
|
||||
g.agent = request.headers.get("User-Agent")
|
||||
if not g.agent and request.path != '/kofi':
|
||||
return 'Please use a "User-Agent" header!', 403
|
||||
|
@ -91,7 +90,7 @@ def before_request():
|
|||
if not request.path: request.path = '/'
|
||||
if request.path != '/':
|
||||
return redirect('/')
|
||||
if request.host != app.config["SERVER_NAME"]: return {"error": "Unauthorized host provided."}, 403
|
||||
elif request.host != app.config["SERVER_NAME"]: return {"error": "Unauthorized host provided."}, 403
|
||||
if request.headers.get("CF-Worker"): return {"error": "Cloudflare workers are not allowed to access this website."}, 403
|
||||
|
||||
if not app.config['SETTINGS']['Bots'] and request.headers.get("Authorization"): abort(403)
|
||||
|
|
|
@ -24,7 +24,7 @@ def front_all(v, sub=None, subdomain=None):
|
|||
if request.host == 'watchpeopledie.co':
|
||||
if v and not v.admin_level: # security: don't auto login admins
|
||||
hash = generate_hash(f'{v.id}+{now.year}+{now.month}+{now.day}+{now.hour}+WPDusermigration')
|
||||
return redirect(f'/?user={v.id}&code={hash}', 301)
|
||||
return redirect(f'https://watchpeopledie.tv/?user={v.id}&code={hash}', 301)
|
||||
else:
|
||||
return render_template('wpdco.html')
|
||||
elif request.host == 'watchpeopledie.tv' and not v: # security: don't try to login people into accounts more than once
|
||||
|
|
|
@ -1,17 +1,68 @@
|
|||
{% extends "default.html" %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="description" content="People die and this is the place to see it. You only have one life, don't make the mistakes seen here.">
|
||||
<style>
|
||||
:root{--primary:#ff66ac}
|
||||
body {
|
||||
padding-top: 54px !important;
|
||||
}
|
||||
@media (max-width: 767.98px) {
|
||||
body {
|
||||
padding-top: 44px !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 380px) {
|
||||
#logo {
|
||||
width: 100px;
|
||||
margin-left: 0.5rem !important;
|
||||
}
|
||||
}
|
||||
.pad {
|
||||
padding-bottom: 7.4px;
|
||||
padding-top: 7.4px;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/assets/css/main.css?v=4032">
|
||||
<link rel="stylesheet" href="/assets/css/midnight.css?v=4000">
|
||||
|
||||
{% block title %}
|
||||
<title>cute cat pictures or something idk</title>
|
||||
{% endblock %}
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
{% block pagetype %}sadface{% endblock %}
|
||||
<meta name="thumbnail" content="/i/WPD/site_preview.webp?v=3009">
|
||||
|
||||
{% block content %}
|
||||
<div class="center">
|
||||
<div class="col-10 col-md-5">
|
||||
<div class="text-center px-3 my-8">
|
||||
<img src="assets/images/WPDBYE_w_text_2.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
<link rel="icon" type="image/webp" href="/i/WPD/icon.webp?v=3009">
|
||||
|
||||
<title>rip</title>
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-touch-fullscreen" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="apple-mobile-web-app-title" content="WPD">
|
||||
<meta name="application-name" content="WPD">
|
||||
<meta name="msapplication-TileColor" content="#ff66ac">
|
||||
<meta name="msapplication-config" content="/assets/browserconfig.xml?v=3009">
|
||||
<meta name="theme-color" content="#ff66ac">
|
||||
</head>
|
||||
|
||||
<body id="rip">
|
||||
<div class="container">
|
||||
<div class="row justify-content-around" id="main-content-row">
|
||||
<div class="col h-100 custom-gutters" id="main-content-col">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-10 col-md-5">
|
||||
<div class="center">
|
||||
<div class="col-10 col-md-5">
|
||||
<div class="text-center px-3 my-8">
|
||||
<img src="assets/images/WPDBYE_w_text_2.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue