Merge pull request #122 from samwafgo/compile_dist

docs:compile
This commit is contained in:
samwafgo
2025-01-16 09:08:19 +08:00
committed by GitHub
5 changed files with 11 additions and 2 deletions
-1
View File
@@ -13,7 +13,6 @@
registration_data.bin
dist/
.idea/
/public/dist/*
!/public/dist/.gitkeep
/logs/*
/ssl/
+3
View File
@@ -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)
+3
View File
@@ -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)
View File
+5 -1
View File
@@ -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 {