diff --git a/server/handler/link_home.go b/server/handler/link_home.go index 833e0d5..9e874f2 100644 --- a/server/handler/link_home.go +++ b/server/handler/link_home.go @@ -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 的软件,可以支持多人同时在线使用。")