Skip to content

Commit

Permalink
feat: 登陆失败提示
Browse files Browse the repository at this point in the history
  • Loading branch information
jie committed Dec 25, 2020
1 parent d3a832f commit 8e29835
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ docker run -d \
- 钉钉:
- 钉钉电脑端 -> 群设置 -> 智能群助手 -> 添加机器人 -> 自定义
- 只勾选 `自定义关键词`, 输入的关键字必须包含在RequestBody的content中, 如:`你的公网IP变了`
- URL中输入钉钉给你的 `Webhook地址`
- URL中输入钉钉给你的 `Webhook地址`
- RequestBody中输入 `{"msgtype": "text","text": {"content": "你的公网IP变了:#{ipv4Addr},域名更新结果:#{ipv4Result}"}}`

## 开发&自行编译
Expand Down
12 changes: 6 additions & 6 deletions asserts/html.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/uesr.go → config/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package config
import (
"bytes"
"encoding/base64"
"log"
"net/http"
"strings"
)
Expand Down Expand Up @@ -55,5 +56,6 @@ func BasicAuth(f ViewFunc) ViewFunc {
w.Header().Set("WWW-Authenticate", `Basic realm="Restricted"`)
// 401 状态码
w.WriteHeader(http.StatusUnauthorized)
log.Printf("%s 登陆失败!\n", r.RemoteAddr)
}
}
2 changes: 1 addition & 1 deletion util/staticPages.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8e29835

Please sign in to comment.