This commit is contained in:
jinnrry 2023-11-23 18:58:49 +08:00
parent faa9dbc673
commit 74e5acbd43

View File

@ -2,6 +2,7 @@ package controllers
import (
"encoding/json"
log "github.com/sirupsen/logrus"
"io"
"net/http"
"pmail/config"
@ -13,6 +14,7 @@ import (
)
func AcmeChallenge(w http.ResponseWriter, r *http.Request) {
log.Infof("AcmeChallenge: %s", r.URL.Path)
instance := ssl.GetHttpChallengeInstance()
token := strings.ReplaceAll(r.URL.Path, "/.well-known/acme-challenge/", "")
auth, exist := instance.AuthInfo[token]