chore: set public path on the fly

This commit is contained in:
Ramires Viana committed 2021-04-20 19:51:10 +00:00
1 parent 8a47aee137
commit 4711e7bcd5
2 files changed
+5 -5

No files matched your search

+2 -5
View File
@@ -126,12 +126,9 @@ func getStaticHandlers(store *storage.Storage, server *settings.Server, assetsFs
}
}
if !strings.HasSuffix(r.URL.Path, ".js") {
http.FileServer(http.FS(assetsFs)).ServeHTTP(w, r)
return 0, nil
}
http.FileServer(http.FS(assetsFs)).ServeHTTP(w, r)
return handleWithStaticData(w, r, d, assetsFs, r.URL.Path, "application/javascript; charset=utf-8")
return 0, nil
}, "/static/", store, server)
return index, static