test again
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-12-29 10:13:33 +11:00
parent 51c5461632
commit 9983d3e8db

View File

@@ -41,13 +41,13 @@ func staticFileServer(content embed.FS) gin.HandlerFunc {
// Root request should load index.htm
if len(fileName) == 1 {
log.Printf("staticFileServer replacing root request with index.html")
fileName = "www/index.html"
fileName = "index.html"
}
//log.Printf("staticFileServer attempting to load filename '%s'\n", fileName)
// Try to open the file from the embedded FS
file, err := content.Open(fileName)
file, err := content.Open("www/" + fileName)
if err != nil {
c.String(http.StatusNotFound, "File not found")
return