From de775309625958a20b796d7f58a8024150cd8ef3 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 7 Feb 2022 22:52:01 +0400 Subject: [PATCH] Set NotFound handler in main. --- cmd/dwelling-upload/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/dwelling-upload/main.go b/cmd/dwelling-upload/main.go index 234cfbd..cd2b40a 100644 --- a/cmd/dwelling-upload/main.go +++ b/cmd/dwelling-upload/main.go @@ -75,6 +75,7 @@ func main() { hand := handlers.NewUploadHandlers(config, logErr, logUpload, logDownload) srv := server.NewHttpServer() + srv.SetNotFoundHandler(hand.NotFound) srv.ServeStatic("/assets/*filepath", http.Dir(config.WebDir+"/assets")) srv.GET("/", hand.Index) srv.POST("/", hand.Upload)