From 675744ad74ffa04a072af44364fd49a9d78cf407 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Fri, 5 Jan 2024 11:26:38 +1100 Subject: [PATCH] fix path of static file --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e7f9fca..7f8ddb3 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,6 @@ import ( "smt/middlewares" "smt/models" "smt/utils" - "strings" "syscall" "time" @@ -61,7 +60,8 @@ func staticFileServer(content embed.FS) gin.HandlerFunc { log.Printf("staticFileServer replacing root request with index.html") fileName = "www/index.html" } else { - fileName = strings.TrimLeft(fileName, "/") + //fileName = strings.TrimLeft(fileName, "/") + fileName = "www" + fileName } log.Printf("staticFileServer attempting to load filename '%s'\n", fileName)