mirror of
				https://github.com/bjdgyc/anylink.git
				synced 2025-11-04 19:16:22 +08:00 
			
		
		
		
	优化代码
This commit is contained in:
		@@ -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 的软件,可以支持多人同时在线使用。")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user