diff --git a/.gitignore b/.gitignore index 0d78920..c759ca7 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ registration_data.bin dist/ .idea/ -/public/dist/* !/public/dist/.gitkeep /logs/* /ssl/ diff --git a/README.md b/README.md index 9232f1e..0a04aa1 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,9 @@ Linux: ./SamWafLinux64 start How to Compile [Compilation Instructions](./docs/compile.md) +Compile Online Manual: +[https://doc.samwaf.com/en/dev/](https://doc.samwaf.com/en/dev/) + ## Tested and Supported Platforms [Tested and Supported Platforms](./docs/Tested_supported_systems.md) diff --git a/README_ch.md b/README_ch.md index 543b36c..057c74c 100644 --- a/README_ch.md +++ b/README_ch.md @@ -219,6 +219,9 @@ PS:windows服务形式升级时候貌似会触发360、火绒规则导致无法 How to compile [编译说明](./docs/compile.md) +在线编译手册: +[https://doc.samwaf.com/dev/](https://doc.samwaf.com/dev/) + ## 已测试支持的平台 [已测试支持的平台](./docs/Tested_supported_systems.md) diff --git a/public/dist/.gitkeep b/public/dist/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/wafmangeweb/static/static.go b/wafmangeweb/static/static.go index a5f3c2f..e10b463 100644 --- a/wafmangeweb/static/static.go +++ b/wafmangeweb/static/static.go @@ -27,7 +27,11 @@ func initIndex() { zlog.Error("failed to read index.html: %v", err) } defer func() { - _ = indexFile.Close() + if indexFile != nil { + _ = indexFile.Close() + } else { + zlog.Error("index.html not exist, you may forget to put dist of frontend to public/dist .Download from https://github.com/samwafgo/SamWafWeb/releases") + } }() index, err := io.ReadAll(indexFile) if err != nil {