From b41c9ec4a2cf26cea263e24145e23b7165cdd9f1 Mon Sep 17 00:00:00 2001 From: polwex Date: Fri, 18 Jul 2025 19:07:53 +0700 Subject: yes! --- lib/router.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/router.ml') diff --git a/lib/router.ml b/lib/router.ml index c3b4af2..ee789c6 100644 --- a/lib/router.ml +++ b/lib/router.ml @@ -27,8 +27,9 @@ let static (path : Parts.t) (_db : Handler.pool) (_req : Request.t) : (Response.t, Caqti_error.t) result = let pat = Parts.wildcard_match path in - Logs.info (fun d -> d "static path %S\n" pat); - match Body.sendfile pat with + let asset_path = "assets/" ^ pat in + Logs.info (fun d -> d "static path %S\n" asset_path); + match Body.sendfile asset_path with | Error _ -> Ok (Response.create `Not_found) | Ok body -> (match Body.to_string body with -- cgit v1.2.3