chore: rename handleDNSRoutes to handleACMEChallengeRoutes
This commit is contained in:
parent
78315dfe71
commit
29e2f2d5e6
|
@ -50,7 +50,7 @@ func (p *acmeProvider) CleanUp(domain, token, keyAuth string) error {
|
||||||
return p.provider.CleanUp(domain, token, keyAuth)
|
return p.provider.CleanUp(domain, token, keyAuth)
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleDNSRoutes(r chi.Router) {
|
func handleACMEChallengeRoutes(r chi.Router) {
|
||||||
handleACMEChallenges := func(r chi.Router) {
|
handleACMEChallenges := func(r chi.Router) {
|
||||||
r.Post("/{domain}", createChallenge)
|
r.Post("/{domain}", createChallenge)
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ func getACMEChallenges(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// disallow FS characters
|
||||||
if strings.ContainsAny(host, "/:|\\") {
|
if strings.ContainsAny(host, "/:|\\") {
|
||||||
host = ""
|
host = ""
|
||||||
}
|
}
|
||||||
|
@ -186,7 +187,7 @@ func RouteAll(r chi.Router) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
handleDNSRoutes(r)
|
handleACMEChallengeRoutes(r)
|
||||||
handleDeviceRoutes(r)
|
handleDeviceRoutes(r)
|
||||||
|
|
||||||
r.Get("/inspect", func(w http.ResponseWriter, r *http.Request) {
|
r.Get("/inspect", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
Loading…
Reference in New Issue