This commit is contained in:
Raphaël MANSUY 2025-12-04 19:18:36 +08:00
parent 3c99bf455e
commit 10f96391f1

View file

@ -817,7 +817,9 @@ def create_app(args):
async def get_response(self, path: str, scope):
response = await super().get_response(path, scope)
if path.endswith(".html"):
is_html = path.endswith(".html") or response.media_type == "text/html"
if is_html:
response.headers["Cache-Control"] = (
"no-cache, no-store, must-revalidate"
)