diff --git a/pkg/server/http.go b/pkg/server/http.go index 61846d9..1a88740 100644 --- a/pkg/server/http.go +++ b/pkg/server/http.go @@ -53,6 +53,10 @@ func (s *HttpServer) ServeStatic(path string, fsys http.FileSystem) { s.router.ServeFiles(path, fsys) } +func (s *HttpServer) SetNotFoundHandler(handler http.HandlerFunc) { + s.router.NotFound = handler +} + // GetURLParam wrapper around underlying router for getting URL parameters. func GetURLParam(r *http.Request, param string) string { return httprouter.ParamsFromContext(r.Context()).ByName(param)