From 15aa2bfc0a0077875a4d1d0feb0d514eb2c8afa2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 22 Feb 2022 11:15:45 +0200 Subject: [PATCH] vc --- files/__main__.py | 2 +- files/routes/static.py | 4 ++-- files/routes/users.py | 2 +- files/templates/authforms.html | 10 ---------- files/templates/default.html | 2 +- files/templates/header.html | 5 ----- files/templates/login.html | 12 +----------- files/templates/login_2fa.html | 11 ----------- files/templates/settings.html | 2 +- files/templates/settings2.html | 2 +- files/templates/sign_up.html | 12 +----------- files/templates/sign_up_failed_ref.html | 12 +----------- files/templates/submit.html | 2 +- 13 files changed, 11 insertions(+), 67 deletions(-) diff --git a/files/__main__.py b/files/__main__.py index 9ab3c9521..891f364ce 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -33,7 +33,7 @@ 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'] = 2628000 +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'] = 8 * 1024 * 1024 diff --git a/files/routes/static.py b/files/routes/static.py index 8ad242a95..17737adc1 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -343,7 +343,7 @@ def static_service(path): resp = make_response(send_from_directory('assets', path)) if request.path.endswith('.webp') or request.path.endswith('.gif') or request.path.endswith('.ttf') or request.path.endswith('.woff') or request.path.endswith('.woff2'): resp.headers.remove("Cache-Control") - resp.headers.add("Cache-Control", "public, max-age=2628000") + resp.headers.add("Cache-Control", "public, max-age=3153600") if request.path.endswith('.webp'): resp.headers.remove("Content-Type") @@ -358,7 +358,7 @@ def static_service(path): def images(path): resp = make_response(send_from_directory('/images', path.replace('.WEBP','.webp'))) resp.headers.remove("Cache-Control") - resp.headers.add("Cache-Control", "public, max-age=2628000") + resp.headers.add("Cache-Control", "public, max-age=3153600") if request.path.endswith('.webp'): resp.headers.remove("Content-Type") resp.headers.add("Content-Type", "image/webp") diff --git a/files/routes/users.py b/files/routes/users.py index e076dd979..7cf4e19a0 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -420,7 +420,7 @@ def usersong(username): def song(song): resp = make_response(send_from_directory('/songs', song)) resp.headers.remove("Cache-Control") - resp.headers.add("Cache-Control", "public, max-age=2628000") + resp.headers.add("Cache-Control", "public, max-age=3153600") return resp @app.post("/subscribe/") diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 431cb3e14..19ba9f5a7 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -45,16 +45,6 @@ - - -
diff --git a/files/templates/default.html b/files/templates/default.html index 91deeb4a4..6ae79c623 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -4,7 +4,7 @@ - + {% if v %} diff --git a/files/templates/header.html b/files/templates/header.html index eff16973f..c468353aa 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -75,11 +75,6 @@ {% else %} {% endif %} -