[FEAT] add cache busting via static_url_for and settings.cache_version (#1964)

closes #1954
this PR add cache busting to `/static`
additionally i combined `lnbits/core/static` with `lnbits/static`, it was not necessary and added a lot of duplicate code for cache busting. now you have to include all static files inside the html files with `{{ static_url_for("static", "app.css" ) }}`

Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
This commit is contained in:
dni ⚡
2023-10-27 13:50:49 +02:00
committed by GitHub
co-authored by Vlad Stan Pavol Rusnak
parent fed2d41139
commit 4d1c4f6348
22 changed files with 122 additions and 121 deletions
+2
View File
@@ -6,6 +6,7 @@ import inspect
import json
from os import path
from sqlite3 import Row
from time import time
from typing import Any, List, Optional
import httpx
@@ -299,6 +300,7 @@ class EnvSettings(LNbitsSettings):
enable_log_to_file: bool = Field(default=True)
log_rotation: str = Field(default="100 MB")
log_retention: str = Field(default="3 months")
server_startup_time: int = Field(default=time())
@property
def has_default_extension_path(self) -> bool: