mirror of https://github.com/bjdgyc/anylink.git
优化代码
This commit is contained in:
parent
4e2ce12f6c
commit
f6fa2fe46b
|
@ -13,8 +13,6 @@ func LinkHome(w http.ResponseWriter, r *http.Request) {
|
|||
// fmt.Println(r.RemoteAddr)
|
||||
// hu, _ := httputil.DumpRequest(r, true)
|
||||
// fmt.Println("DumpHome: ", string(hu))
|
||||
index := &dbdata.SettingOther{}
|
||||
dbdata.SettingGet(index)
|
||||
connection := strings.ToLower(r.Header.Get("Connection"))
|
||||
userAgent := strings.ToLower(r.UserAgent())
|
||||
if connection == "close" && (strings.Contains(userAgent, "anyconnect") || strings.Contains(userAgent, "openconnect")) {
|
||||
|
@ -22,7 +20,8 @@ func LinkHome(w http.ResponseWriter, r *http.Request) {
|
|||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
index := &dbdata.SettingOther{}
|
||||
dbdata.SettingGet(index)
|
||||
w.WriteHeader(http.StatusOK)
|
||||
fmt.Fprintln(w, index.Homeindex)
|
||||
// fmt.Fprintln(w, "AnyLink 是一个企业级远程办公 sslvpn 的软件,可以支持多人同时在线使用。")
|
||||
|
|
Loading…
Reference in New Issue