From 9422b3e722398d5db53e1b4a341bfa748b8985c1 Mon Sep 17 00:00:00 2001 From: sli Date: Tue, 14 Oct 2025 21:48:28 -0500 Subject: [PATCH] Look for index.htm[l] --- src/babashka/http_server.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/babashka/http_server.clj b/src/babashka/http_server.clj index 3f7f852..80327ea 100755 --- a/src/babashka/http_server.clj +++ b/src/babashka/http_server.clj @@ -212,7 +212,7 @@ (defn- file-router [dir {:keys [not-found headers]}] (fn [{:keys [uri] :as req}] (let [f (fs/path dir (str/replace-first (URLDecoder/decode uri) #"^/" "")) - index-file (fs/path f "index.html")] + index-file (some #(when (fs/readable? %) %) (fs/glob f "index.{htm,html}"))] (update (cond (and (fs/directory? f) (fs/readable? index-file)) (body index-file)