From 0961a217223d606bdc5cba63889258b835439e35 Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 21 May 2025 16:17:42 +0800 Subject: [PATCH] Set correct Content-Type header for JavaScript files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fix missing Content-Type header for .js files • Ensure proper MIME type handling • Improve browser compatibility --- lightrag/api/lightrag_server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index f159bfc4..51e1b6af 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -488,6 +488,8 @@ def create_app(args): ) response.headers["Pragma"] = "no-cache" response.headers["Expires"] = "0" + elif path.endswith(".js"): + response.headers["Content-Type"] = "application/javascript" return response # Webui mount webui/index.html