mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 15:18:31 +08:00
添加版本信息
This commit is contained in:
@@ -44,6 +44,7 @@ type macAddressList struct {
|
||||
|
||||
func setCommonHeader(w http.ResponseWriter) {
|
||||
// Content-Length Date 默认已经存在
|
||||
w.Header().Set("Server", "AnyLink")
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
w.Header().Set("Cache-Control", "no-store,no-cache")
|
||||
w.Header().Set("Pragma", "no-cache")
|
||||
|
@@ -13,6 +13,7 @@ func LinkHome(w http.ResponseWriter, r *http.Request) {
|
||||
// fmt.Println(r.RemoteAddr)
|
||||
// hu, _ := httputil.DumpRequest(r, true)
|
||||
// fmt.Println("DumpHome: ", string(hu))
|
||||
w.Header().Set("Server", "AnyLink")
|
||||
connection := strings.ToLower(r.Header.Get("Connection"))
|
||||
userAgent := strings.ToLower(r.UserAgent())
|
||||
if connection == "close" && (strings.Contains(userAgent, "anyconnect") || strings.Contains(userAgent, "openconnect")) {
|
||||
|
Reference in New Issue
Block a user