← Back to task

Commit 51ad9f73

commit 51ad9f7376d20bde20b16203913c0cf9465673e0
Author: Coder Agent <coder@agents.omni>
Date:   Mon Feb 16 20:14:45 2026

    Normalize Omni.Web stripping for trailing slashes
    
    Fix /news/ routing after removing Caddy path rewrites.
    
    Filter empty segments after prefix stripping in Omni.Web.
    
    Task-Id: t-617

diff --git a/Omni/Web.hs b/Omni/Web.hs
index 476c37ab..6e4d19c7 100644
--- a/Omni/Web.hs
+++ b/Omni/Web.hs
@@ -59,7 +59,7 @@ app avaDbPath newsConn filesRoot req respond =
 stripPrefixRequest :: Text -> Wai.Request -> Wai.Request
 stripPrefixRequest prefix req =
   let strippedPath = case Wai.pathInfo req of
-        _ : rest -> rest
+        _ : rest -> filter (/= "") rest
         [] -> []
       raw = Wai.rawPathInfo req
       prefixBytes = "/" <> TextEncoding.encodeUtf8 prefix