From 10f96391f195fa332eb5b6a39682401d72d68d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20MANSUY?= Date: Thu, 4 Dec 2025 19:18:36 +0800 Subject: [PATCH] cherry-pick f45dce34 --- lightrag/api/lightrag_server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index 26ce905f..643bec15 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -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" )