diff --git a/README.md b/README.md index 9552699..dcf840d 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ # 安装 -1. git clone -b 125 --depth=1 https://github.com/soxft/busuanzi.git && cd busuanzi -2. go build -o busuanzi main.go +1. `git clone -b 126 --depth=1 https://github.com/soxft/busuanzi.git && cd busuanzi` +2. `go build -o busuanzi main.go` 3. 根据提示修改 config.yml 4. 编辑 dist/busuanzi.js 替换链接为自己的, 也可以编辑ts文件自行编译 -5. 运行二进制文件 +5. 通过命令 `./busuanzi -c config.yaml` 启动程序 diff --git a/app/middleware/cors.go b/app/middleware/cors.go index 38683c4..8a812d8 100644 --- a/app/middleware/cors.go +++ b/app/middleware/cors.go @@ -8,7 +8,7 @@ import ( func Cors() gin.HandlerFunc { return func(c *gin.Context) { c.Header("Access-Control-Allow-Origin", config.Web.Cors) - c.Header("Server", "busuanzi-by-xcsoft/2.7.1") + c.Header("Server", "busuanzi-by-xcsoft/2.7.2") if c.Request.Method == "OPTIONS" { c.Header("Access-Control-Allow-Methods", "GET, POST, HEAD, OPTIONS") c.Header("Access-Control-Allow-Headers", "x-bsz-referer, Authorization") diff --git a/config.yaml b/config.yaml index 7cb4dd7..75d8201 100644 --- a/config.yaml +++ b/config.yaml @@ -12,4 +12,4 @@ Redis: MaxActive: 100 # 最大连接数 Bsz: Expire: 2592000 # 统计数据过期时间 单位秒, 请输入整数 (无任何访问, 超过这个时间后, 统计数据将被清空, 0为不过期) - JwtSecret: "bsz" # JWT签名密钥 \ No newline at end of file + JwtSecret: "bsz" # JWT签名密钥 // 请设置为任意长度的随机值 \ No newline at end of file