diff --git a/README.md b/README.md
index 7b3e7f7..20f1666 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
LOGO designed by 熊大 .
-
+
:trollface: Nezha Monitoring: Self-hosted, lightweight server and website monitoring and O&M tool.
diff --git a/cmd/dashboard/controller/controller.go b/cmd/dashboard/controller/controller.go index d03268c..310a246 100644 --- a/cmd/dashboard/controller/controller.go +++ b/cmd/dashboard/controller/controller.go @@ -44,8 +44,9 @@ func ServeWeb(port uint) *http.Server { r.NoMethod(page404) srv := &http.Server{ - Addr: fmt.Sprintf(":%d", port), - Handler: r, + Addr: fmt.Sprintf(":%d", port), + ReadHeaderTimeout: time.Second * 5, + Handler: r, } return srv } diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index db38506..0293746 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -98,7 +98,7 @@ func SplitIPAddr(v4v6Bundle string) (string, string, string) { } func IsDirEmpty(name string) (bool, error) { - f, err := os.Open(filepath.Clean(name)) + f, err := os.Open(filepath.Join("./", filepath.Clean(name))) if err != nil { return false, err } diff --git a/service/singleton/singleton.go b/service/singleton/singleton.go index 7331bbc..4eb93c5 100644 --- a/service/singleton/singleton.go +++ b/service/singleton/singleton.go @@ -12,7 +12,7 @@ import ( "github.com/naiba/nezha/pkg/utils" ) -var Version = "v0.13.29" // !!记得修改 README 中的 badge 版本!! +var Version = "v0.13.30" // !!记得修改 README 中的 badge 版本!! var ( Conf *model.Config