From 390f592719e2683fa68ddc4c29be745165fb06c1 Mon Sep 17 00:00:00 2001 From: jinnrry Date: Thu, 28 Sep 2023 09:38:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dssl=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/http_server/http_server.go | 2 ++ server/http_server/https_server.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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))