diff --git a/server/http_server/http_server.go b/server/http_server/http_server.go index 8fe9794a..652ee689 100644 --- a/server/http_server/http_server.go +++ b/server/http_server/http_server.go @@ -42,6 +42,8 @@ func HttpStart() { panic(err) } mux.Handle("/", http.FileServer(http.FS(fe))) + // 挑战请求类似这样 /.well-known/acme-challenge/QPyMAyaWw9s5JvV1oruyqWHG7OqkHMJEHPoUz2046KM + mux.HandleFunc("/.well-known/", controllers.AcmeChallenge) mux.HandleFunc("/api/ping", contextIterceptor(controllers.Ping)) mux.HandleFunc("/api/login", contextIterceptor(controllers.Login)) mux.HandleFunc("/api/group", contextIterceptor(controllers.GetUserGroup)) diff --git a/server/http_server/https_server.go b/server/http_server/https_server.go index 213bbc57..d8d3cdac 100644 --- a/server/http_server/https_server.go +++ b/server/http_server/https_server.go @@ -43,7 +43,8 @@ func HttpsStart() { panic(err) } mux.Handle("/", http.FileServer(http.FS(fe))) - + // 挑战请求类似这样 /.well-known/acme-challenge/QPyMAyaWw9s5JvV1oruyqWHG7OqkHMJEHPoUz2046KM + mux.HandleFunc("/.well-known/", controllers.AcmeChallenge) mux.HandleFunc("/api/ping", contextIterceptor(controllers.Ping)) mux.HandleFunc("/api/login", contextIterceptor(controllers.Login)) mux.HandleFunc("/api/group", contextIterceptor(controllers.GetUserGroup))