chore: rename handleDNSRoutes to handleACMEChallengeRoutes

This commit is contained in:
AJ ONeal 2022-06-07 00:14:18 -06:00
parent 78315dfe71
commit 29e2f2d5e6
Signed by: coolaj86
GPG Key ID: 585419CA6DB0AA23
2 changed files with 3 additions and 2 deletions

View File

@ -50,7 +50,7 @@ func (p *acmeProvider) CleanUp(domain, token, keyAuth string) error {
return p.provider.CleanUp(domain, token, keyAuth)
}
func handleDNSRoutes(r chi.Router) {
func handleACMEChallengeRoutes(r chi.Router) {
handleACMEChallenges := func(r chi.Router) {
r.Post("/{domain}", createChallenge)

View File

@ -53,6 +53,7 @@ func getACMEChallenges(w http.ResponseWriter, r *http.Request) {
}
*/
// disallow FS characters
if strings.ContainsAny(host, "/:|\\") {
host = ""
}
@ -186,7 +187,7 @@ func RouteAll(r chi.Router) {
})
})
handleDNSRoutes(r)
handleACMEChallengeRoutes(r)
handleDeviceRoutes(r)
r.Get("/inspect", func(w http.ResponseWriter, r *http.Request) {