Skip to content

Commit aad4060

Browse files
author
Paulo Gomes
authored
Merge pull request #972 from fluxcd/fs-new-servemux
fileserver: Use new ServeMux
2 parents 04d87b6 + d0097c2 commit aad4060

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,9 @@ func main() {
345345
func startFileServer(path string, address string, l logr.Logger) {
346346
l.Info("starting file server")
347347
fs := http.FileServer(http.Dir(path))
348-
http.Handle("/", fs)
349-
err := http.ListenAndServe(address, nil)
348+
mux := http.NewServeMux()
349+
mux.Handle("/", fs)
350+
err := http.ListenAndServe(address, mux)
350351
if err != nil {
351352
l.Error(err, "file server error")
352353
}

0 commit comments

Comments
 (0)