fsfd
This commit is contained in:
parent
763a4126c5
commit
e71095f563
11 changed files with 17 additions and 18 deletions
|
@ -88,9 +88,8 @@ mail = Mail(app)
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def before_request():
|
def before_request():
|
||||||
host = request.headers.get("Host", "")
|
if request.host != app.config["SERVER_NAME"]: return {"error":"Unauthorized host provided."}, 401
|
||||||
if host.strip().lower() != app.config["SERVER_NAME"].strip().lower(): return {"error":f"Unauthorized host provided ({host})."}, 401
|
if request.headers.get("CF-Worker"): return {"error":"Cloudflare workers are not allowed to access this website."}, 401
|
||||||
if request.headers.get("CF-Worker", "") != "": return {"error":"Cloudflare workers are not allowed to access this website."}, 401
|
|
||||||
|
|
||||||
if request.method.lower() != "get" and app.config["READ_ONLY"]:
|
if request.method.lower() != "get" and app.config["READ_ONLY"]:
|
||||||
return {"error":f"{app.config['SITE_NAME']} is currently in read-only mode."}, 500
|
return {"error":f"{app.config['SITE_NAME']} is currently in read-only mode."}, 500
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<title>Chat</title>
|
<title>Chat</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212">
|
||||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
||||||
{% if v.css %}
|
{% if v.css %}
|
||||||
<link rel="stylesheet" href="/@{{v.username}}/css">
|
<link rel="stylesheet" href="/@{{v.username}}/css">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<script src="/assets/js/bootstrap.js?v=245"></script>
|
<script src="/assets/js/bootstrap.js?v=245"></script>
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212">
|
||||||
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212">
|
||||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row justify-content-around">
|
<div class="row justify-content-around">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212">
|
||||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<title>2-Step Login - {{SITE_NAME}}</title>
|
<title>2-Step Login - {{SITE_NAME}}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
|
||||||
|
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<style>:root{--primary:#{{v.themecolor}}}</style>
|
<style>:root{--primary:#{{v.themecolor}}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=41">
|
||||||
{% if v.agendaposter %}
|
{% if v.agendaposter %}
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css?v=211">
|
<link rel="stylesheet" href="/assets/css/main.css?v=212">
|
||||||
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=41">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue