diff --git a/main.go b/main.go index 8abb29f..2477739 100644 --- a/main.go +++ b/main.go @@ -62,20 +62,20 @@ func main() { } defer db.Close() - customHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // Don't handle /static/ paths here - let the static file server handle those - if strings.HasPrefix(r.URL.Path, "/static/") { - http.NotFound(w, r) - return - } + // customHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // // Don't handle /static/ paths here - let the static file server handle those + // if strings.HasPrefix(r.URL.Path, "/static/") { + // http.NotFound(w, r) + // return + // } - // For all other routes, serve index.html - indexPath := filepath.Join(staticPath, "index.html") - http.ServeFile(w, r, indexPath) - }) + // // For all other routes, serve index.html + // indexPath := filepath.Join(staticPath, "index.html") + // http.ServeFile(w, r, indexPath) + // }) // Register the catch-all handler for non-static routes - staticRouter.PathPrefix("/").Handler(customHandler) + //staticRouter.PathPrefix("/").Handler(customHandler) fmt.Println("Default user 'boxuser' created successfully!")