stop using app.config for our own stuff

remotes/1693045480750635534/spooky-22
Aevann1 2022-06-24 17:08:57 +02:00
parent fcf600cb35
commit f34c4e1196
23 changed files with 74 additions and 72 deletions

View File

@ -23,39 +23,28 @@ app.jinja_env.cache = {}
app.jinja_env.auto_reload = True
faulthandler.enable()
app.config["SITE_NAME"]=environ.get("SITE_NAME").strip()
app.config["GUMROAD_LINK"]=environ.get("GUMROAD_LINK", "https://marsey1.gumroad.com/l/tfcvri").strip()
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['DATABASE_URL'] = environ.get("DATABASE_URL", "postgresql://postgres@localhost:5432")
app.config['SECRET_KEY'] = environ.get('MASTER_KEY')
app.config["SERVER_NAME"] = environ.get("DOMAIN").strip()
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 3153600
app.config["SESSION_COOKIE_NAME"] = "session_" + environ.get("SITE_NAME").strip().lower()
app.config["VERSION"] = "1.0.0"
app.config['MAX_CONTENT_LENGTH'] = 100 * 1024 * 1024
app.config["SESSION_COOKIE_SECURE"] = True
app.config["SESSION_COOKIE_SAMESITE"] = "Lax"
app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 365
app.config['SESSION_REFRESH_EACH_REQUEST'] = False
app.config["DEFAULT_COLOR"] = environ.get("DEFAULT_COLOR", "ff0000").strip()
app.config["DEFAULT_THEME"] = environ.get("DEFAULT_THEME", "midnight").strip()
app.config["FORCE_HTTPS"] = 1
app.config["UserAgent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"
app.config["HCAPTCHA_SITEKEY"] = environ.get("HCAPTCHA_SITEKEY","").strip()
app.config["HCAPTCHA_SECRET"] = environ.get("HCAPTCHA_SECRET","").strip()
app.config["SPAM_SIMILARITY_THRESHOLD"] = float(environ.get("SPAM_SIMILARITY_THRESHOLD", 0.5))
app.config["SPAM_URL_SIMILARITY_THRESHOLD"] = float(environ.get("SPAM_URL_SIMILARITY_THRESHOLD", 0.1))
app.config["SPAM_SIMILAR_COUNT_THRESHOLD"] = int(environ.get("SPAM_SIMILAR_COUNT_THRESHOLD", 10))
app.config["COMMENT_SPAM_SIMILAR_THRESHOLD"] = float(environ.get("COMMENT_SPAM_SIMILAR_THRESHOLD", 0.5))
app.config["COMMENT_SPAM_COUNT_THRESHOLD"] = int(environ.get("COMMENT_SPAM_COUNT_THRESHOLD", 10))
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['SQLALCHEMY_DATABASE_URL'] = environ.get("DATABASE_URL", "postgresql://postgres@localhost:5432")
app.config["CACHE_TYPE"] = "RedisCache"
app.config["CACHE_REDIS_URL"] = environ.get("REDIS_URL", "redis://localhost")
app.config['MAIL_SERVER'] = 'smtp.gmail.com'
app.config['MAIL_PORT'] = 587
app.config['MAIL_USE_TLS'] = True
app.config['MAIL_USERNAME'] = environ.get("MAIL_USERNAME", "").strip()
app.config['MAIL_PASSWORD'] = environ.get("MAIL_PASSWORD", "").strip()
app.config['DESCRIPTION'] = environ.get("DESCRIPTION", "rdrama.net caters to drama in all forms such as: Real life, videos, photos, gossip, rumors, news sites, Reddit, and Beyond™. There isn't drama we won't touch, and we want it all!").strip()
app.config['SETTINGS'] = {}
r=redis.Redis(host=environ.get("REDIS_URL", "redis://localhost"), decode_responses=True, ssl_cert_reqs=None)
@ -74,7 +63,7 @@ limiter = Limiter(
Base = declarative_base()
engine = create_engine(app.config['DATABASE_URL'])
engine = create_engine(app.config['SQLALCHEMY_DATABASE_URL'])
db_session = scoped_session(sessionmaker(bind=engine, autoflush=False))

View File

@ -906,4 +906,17 @@ def is_safe_url(url):
return '\\' not in url and (url.startswith('/') or tldextract.extract(url).registered_domain in approved_embed_hosts)
hosts = "|".join(approved_embed_hosts).replace('.','\.')
hosts = "|".join(approved_embed_hosts).replace('.','\.')
SITE_NAME = environ.get("SITE_NAME").strip()
GUMROAD_LINK = environ.get("GUMROAD_LINK", "https://marsey1.gumroad.com/l/tfcvri").strip()
DEFAULT_COLOR = environ.get("DEFAULT_COLOR", "ff0000").strip()
DEFAULT_THEME = environ.get("DEFAULT_THEME", "midnight").strip()
HCAPTCHA_SITEKEY = environ.get("HCAPTCHA_SITEKEY","").strip()
HCAPTCHA_SECRET = environ.get("HCAPTCHA_SECRET","").strip()
SPAM_SIMILARITY_THRESHOLD = float(environ.get("SPAM_SIMILARITY_THRESHOLD", 0.5))
SPAM_URL_SIMILARITY_THRESHOLD = float(environ.get("SPAM_URL_SIMILARITY_THRESHOLD", 0.1))
SPAM_SIMILAR_COUNT_THRESHOLD = int(environ.get("SPAM_SIMILAR_COUNT_THRESHOLD", 10))
COMMENT_SPAM_SIMILAR_THRESHOLD = float(environ.get("COMMENT_SPAM_SIMILAR_THRESHOLD", 0.5))
COMMENT_SPAM_COUNT_THRESHOLD = int(environ.get("COMMENT_SPAM_COUNT_THRESHOLD", 10))
DESCRIPTION = environ.get("DESCRIPTION", "rdrama.net caters to drama in all forms such as: Real life, videos, photos, gossip, rumors, news sites, Reddit, and Beyond™. There isn't drama we won't touch, and we want it all!").strip()

View File

@ -53,6 +53,6 @@ def inject_constants():
return {"environ":environ, "SITE":SITE, "SITE_NAME":SITE_NAME, "SITE_FULL":SITE_FULL,
"AUTOJANNY_ID":AUTOJANNY_ID, "NOTIFICATIONS_ID":NOTIFICATIONS_ID, "PUSHER_ID":PUSHER_ID,
"CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID,
"PIZZASHILL_ID":PIZZASHILL_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR,
"PIZZASHILL_ID":PIZZASHILL_ID, "DEFAULT_COLOR":DEFAULT_COLOR,
"COLORS":COLORS, "ADMIGGERS":ADMIGGERS, "datetime":datetime, "time":time,
"LOTTERY_ENABLED": LOTTERY_ENABLED}
"LOTTERY_ENABLED": LOTTERY_ENABLED, "GUMROAD_LINK": GUMROAD_LINK, "DEFAULT_THEME": DEFAULT_THEME, "DESCRIPTION": DESCRIPTION}

View File

@ -25,7 +25,7 @@ def send_verification_email(user, email=None):
if not email:
email = user.email
url = f"https://{app.config['SERVER_NAME']}/activate"
url = f"https://{SERVER_NAME}/activate"
now = int(time.time())
token = generate_hash(f"{email}+{user.id}+{now}")

View File

@ -336,11 +336,11 @@ def api_comment(v):
similar_comments = g.db.query(Comment).filter(
Comment.author_id == v.id,
Comment.body.op(
'<->')(body) < app.config["COMMENT_SPAM_SIMILAR_THRESHOLD"],
'<->')(body) < COMMENT_SPAM_SIMILAR_THRESHOLD,
Comment.created_utc > cutoff
).all()
threshold = app.config["COMMENT_SPAM_COUNT_THRESHOLD"]
threshold = COMMENT_SPAM_COUNT_THRESHOLD
if v.age >= (60 * 60 * 24 * 7):
threshold *= 3
elif v.age >= (60 * 60 * 24):
@ -713,11 +713,11 @@ def edit_comment(cid, v):
).filter(
Comment.author_id == v.id,
Comment.body.op(
'<->')(body) < app.config["SPAM_SIMILARITY_THRESHOLD"],
'<->')(body) < SPAM_SIMILARITY_THRESHOLD,
Comment.created_utc > cutoff
).all()
threshold = app.config["SPAM_SIMILAR_COUNT_THRESHOLD"]
threshold = SPAM_SIMILAR_COUNT_THRESHOLD
if v.age >= (60 * 60 * 24 * 30):
threshold *= 4
elif v.age >= (60 * 60 * 24 * 7):

View File

@ -26,7 +26,7 @@ def join_discord(v):
state=f"{now}.{state}"
return redirect(f"https://discord.com/api/oauth2/authorize?client_id={CLIENT_ID}&redirect_uri=https%3A%2F%2F{app.config['SERVER_NAME']}%2Fdiscord_redirect&response_type=code&scope=identify%20guilds.join&state={state}")
return redirect(f"https://discord.com/api/oauth2/authorize?client_id={CLIENT_ID}&redirect_uri=https%3A%2F%2F{SERVER_NAME}%2Fdiscord_redirect&response_type=code&scope=identify%20guilds.join&state={state}")
@app.get("/discord_redirect")
@ -56,7 +56,7 @@ def discord_redirect(v):
'client_secret': CLIENT_SECRET,
'grant_type': 'authorization_code',
'code': code,
'redirect_uri': f"https://{app.config['SERVER_NAME']}/discord_redirect",
'redirect_uri': f"https://{SERVER_NAME}/discord_redirect",
'scope': 'identify guilds.join'
}
headers={

View File

@ -220,7 +220,7 @@ def sign_up_get(v):
formkey=formkey,
now=now,
ref_user=ref_user,
hcaptcha=app.config["HCAPTCHA_SITEKEY"],
hcaptcha=HCAPTCHA_SITEKEY,
error=error
)
@ -294,14 +294,14 @@ def sign_up_post(v):
if existing_account:
return signup_error("An account with that username already exists.")
if app.config.get("HCAPTCHA_SITEKEY"):
if HCAPTCHA_SITEKEY:
token = request.values.get("h-captcha-response")
if not token:
return signup_error("Unable to verify captcha [1].")
data = {"secret": app.config["HCAPTCHA_SECRET"],
data = {"secret": HCAPTCHA_SECRET,
"response": token,
"sitekey": app.config["HCAPTCHA_SITEKEY"]}
"sitekey": HCAPTCHA_SITEKEY}
url = "https://hcaptcha.com/siteverify"
x = requests.post(url, data=data, timeout=5)

View File

@ -829,7 +829,7 @@ def submit_post(v, sub=None):
except: pass
embed += '"></lite-youtube>'
elif app.config['SERVER_NAME'] in domain and "/post/" in url and "context" not in url:
elif SERVER_NAME in domain and "/post/" in url and "context" not in url:
id = url.split("/post/")[1]
if "/" in id: id = id.split("/")[0]
embed = str(int(id))
@ -861,19 +861,19 @@ def submit_post(v, sub=None):
similar_posts = g.db.query(Submission).filter(
Submission.author_id == v.id,
Submission.title.op('<->')(title) < app.config["SPAM_SIMILARITY_THRESHOLD"],
Submission.title.op('<->')(title) < SPAM_SIMILARITY_THRESHOLD,
Submission.created_utc > cutoff
).all()
if url:
similar_urls = g.db.query(Submission).filter(
Submission.author_id == v.id,
Submission.url.op('<->')(url) < app.config["SPAM_URL_SIMILARITY_THRESHOLD"],
Submission.url.op('<->')(url) < SPAM_URL_SIMILARITY_THRESHOLD,
Submission.created_utc > cutoff
).all()
else: similar_urls = []
threshold = app.config["SPAM_SIMILAR_COUNT_THRESHOLD"]
threshold = SPAM_SIMILAR_COUNT_THRESHOLD
if v.age >= (60 * 60 * 24 * 7): threshold *= 3
elif v.age >= (60 * 60 * 24): threshold *= 2

View File

@ -808,7 +808,7 @@ def mfa_qr(secret, v):
qr = qrcode.QRCode(
error_correction=qrcode.constants.ERROR_CORRECT_L
)
qr.add_data(x.provisioning_uri(v.username, issuer_name=app.config["SITE_NAME"]))
qr.add_data(x.provisioning_uri(v.username, issuer_name=SITE_NAME))
img = qr.make_image(fill_color="#000000", back_color="white")
mem = io.BytesIO()

View File

@ -4,7 +4,7 @@
<html lang="en">
<head>
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<meta charset="utf-8">
@ -45,7 +45,7 @@
{% else %}
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
<link rel="stylesheet" href="/assets/css/{{DEFAULT_THEME}}.css?v=57">
{% endif %}
</head>

View File

@ -3,7 +3,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<meta charset="utf-8">

View File

@ -3,7 +3,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<script>
if (navigator.deviceMemory < 3)
@ -60,7 +60,7 @@
{% else %}
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
<link rel="stylesheet" href="/assets/css/{{DEFAULT_THEME}}.css?v=57">
<link rel="stylesheet" href="/assets/css/awards.css?v=11">
{% endif %}
@ -106,7 +106,7 @@
<meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta property="og:url" content="{{SITE_FULL}}{{request.full_path}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}">
<meta property="og:site_name" content="{{request.host}}">
@ -114,7 +114,7 @@
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="{{SITE_FULL}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta name="twitter:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta name="twitter:url" content="{{SITE_FULL}}{{request.full_path}}">
{% endblock %}

View File

@ -2,7 +2,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

View File

@ -13,7 +13,7 @@
<img alt=":#marseymerchant:" loading="lazy" class="mb-2" src="/e/marseymerchant.webp">
<h1 class="h5">401 Not Authorized</h1>
<p class="text-muted">This page is only available to {% if SITE_NAME == 'rDrama' %}paypigs{% else %}patrons{% endif %}:</p>
<a rel="nofollow noopener noreferrer" href="{{config('GUMROAD_LINK')}}">{{config('GUMROAD_LINK')}}</a>
<a rel="nofollow noopener noreferrer" href="{{GUMROAD_LINK')}}">{{config('GUMROAD_LINK}}</a>
</div>
</div>
</div>

View File

@ -187,7 +187,7 @@
<button class="dropdown-item copy-link" data-clipboard-text="{{SITE_FULL}}/signup?ref={{v.username}}"><i class="fas fa-user-friends fa-fw mr-3"></i>Invite friends</button>
</div>
<div class="px-2">
<a class="dropdown-item" href="/assets/app_{{config('SITE_NAME')}}_v2.4.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
<a class="dropdown-item" href="/assets/app_{{SITE_NAME}}_v2.4.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
<a class="dropdown-item" href="https://rdrama.net/changelog"><i class="fas fa-clipboard fa-fw mr-3"></i>Changelog</a>
@ -202,7 +202,7 @@
<a class="dropdown-item" href="/post/75863/"><i class="fas fa-square-share-nodes fa-fw mr-3"></i>Fediverse</a>
{% endif %}
{% if SITE_NAME not in ('Cringetopia', 'WPD') %}
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="{{config('GUMROAD_LINK')}}"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="{{GUMROAD_LINK}}"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
{% endif %}
{% if SITE_NAME == 'rDrama' %}
<a class="dropdown-item" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Archives</a>
@ -252,7 +252,7 @@
</li>
{% endif %}
<a class="nav-item nav-link" href="/assets/app_{{config('SITE_NAME')}}_v2.4.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
<a class="nav-item nav-link" href="/assets/app_{{SITE_NAME}}_v2.4.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>
@ -261,7 +261,7 @@
<a class="nav-item nav-link" href="/post/75863/"><i class="fas fa-square-share-nodes fa-fw mr-3"></i>Fediverse</a>
{% endif %}
{% if SITE_NAME not in ('Cringetopia', 'WPD') %}
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="{{config('GUMROAD_LINK')}}"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="{{GUMROAD_LINK}}"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
{% endif %}
{% if SITE_NAME == 'rDrama' %}<a class="nav-item nav-link" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Archives</a>{% endif %}
<a class="nav-item nav-link" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a>

View File

@ -32,7 +32,7 @@
{% else %}
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
<link rel="stylesheet" href="/assets/css/{{DEFAULT_THEME}}.css?v=57">
{% endif %}
<div class="row justify-content-around">

View File

@ -6,7 +6,7 @@
<head>
<link rel="icon" type="image/webp" href="/i/{{SITE_NAME}}/icon.webp?v=2000">
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<script src="{{asset('js/bootstrap.js')}}"></script>
@ -22,7 +22,7 @@
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
<link rel="stylesheet" href="/assets/css/{{DEFAULT_THEME}}.css?v=57">
</head>

View File

@ -6,7 +6,7 @@
<head>
<link rel="icon" type="image/webp" href="/i/{{SITE_NAME}}/icon.webp?v=2000">
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<meta charset="utf-8">
@ -18,7 +18,7 @@
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
<link rel="stylesheet" href="/assets/css/{{DEFAULT_THEME}}.css?v=57">
</head>

View File

@ -3,7 +3,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<script src="{{asset('js/bootstrap.js')}}"></script>
@ -21,7 +21,7 @@
<meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta property="og:url" content="{{request.host}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}">
<meta property="og:site_name" content="{{request.host}}">
@ -29,7 +29,7 @@
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="{{SITE_FULL}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta name="twitter:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta name="twitter:url" content="{{request.host}}">

View File

@ -4,7 +4,7 @@
<html lang="en">
<head>
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<script src="{{asset('js/bootstrap.js')}}"></script>
@ -21,7 +21,7 @@
<meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta property="og:url" content="{{SITE_FULL}}{{request.full_path}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}">
<meta property="og:site_name" content="{{request.host}}">
@ -29,7 +29,7 @@
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="{{SITE_FULL}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta name="twitter:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta name="twitter:url" content="{{SITE_FULL}}{{request.full_path}}">
@ -45,7 +45,7 @@
{% else %}
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
<link rel="stylesheet" href="/assets/css/{{DEFAULT_THEME}}.css?v=57">
{% endif %}
</head>

View File

@ -5,7 +5,7 @@
<head>
<link rel="icon" type="image/webp" href="/i/{{SITE_NAME}}/icon.webp?v=2000">
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<script src="{{asset('js/bootstrap.js')}}"></script>
@ -19,7 +19,7 @@
<meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta property="og:url" content="{{request.host}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}">
<meta property="og:site_name" content="{{request.host}}">
@ -27,7 +27,7 @@
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="{{SITE_FULL}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta name="twitter:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta name="twitter:url" content="{{request.host}}">
@ -35,7 +35,7 @@
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
<link rel="stylesheet" href="/assets/css/{{DEFAULT_THEME}}.css?v=57">
</head>

View File

@ -6,7 +6,7 @@
<head>
<link rel="icon" type="image/webp" href="/i/{{SITE_NAME}}/icon.webp?v=2000">
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<script src="{{asset('js/bootstrap.js')}}"></script>
@ -20,7 +20,7 @@
<meta property="og:site_name" content="{{request.host}}">
<meta property="og:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta property="og:url" content="{{request.host}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta property="og:description" name="description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta property="og:author" name="author" content="{{SITE_FULL}}">
<meta property="og:site_name" content="{{request.host}}">
@ -28,7 +28,7 @@
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="{{SITE_NAME}}">
<meta name="twitter:creator" content="{{SITE_FULL}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{config('DESCRIPTION')}}">
<meta name="twitter:description" content="{{SITE_NAME}} - {{DESCRIPTION}}">
<meta name="twitter:image" content="/i/{{SITE_NAME}}/site_preview.webp?v=2000">
<meta name="twitter:url" content="{{request.host}}">
@ -36,7 +36,7 @@
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=57">
<link rel="stylesheet" href="/assets/css/{{DEFAULT_THEME}}.css?v=57">
</head>

View File

@ -3,7 +3,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="{{config('DESCRIPTION')}}">
<meta name="description" content="{{DESCRIPTION}}">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'; connect-src 'self'; object-src 'none';">
<script src="{{asset('js/bootstrap.js')}}"></script>
@ -54,7 +54,7 @@
{% else %}
<style>:root{--primary:#{{DEFAULT_COLOR}}</style>
<link rel="stylesheet" href="{{asset('css/main.css')}}">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=49">
<link rel="stylesheet" href="/assets/css/{{DEFAULT_THEME}}.css?v=49">
{% endif %}
{% endblock %}