update admin proxies: handle ACME DNS 01 proxy
This commit is contained in:
parent
d5b2837033
commit
6b7a642350
|
@ -3,7 +3,10 @@
|
||||||
"api_host": ":hostname/api",
|
"api_host": ":hostname/api",
|
||||||
"authn": {
|
"authn": {
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"pathname": "inspect"
|
"pathname": ""
|
||||||
|
},
|
||||||
|
"acme_dns_01_proxy": {
|
||||||
|
"pathname": "dns"
|
||||||
},
|
},
|
||||||
"pair_request": {
|
"pair_request": {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
|
|
|
@ -53,9 +53,15 @@ func InitAdmin(authURL string) {
|
||||||
r.URL.Path = strings.TrimPrefix(r.URL.Path, "/api")
|
r.URL.Path = strings.TrimPrefix(r.URL.Path, "/api")
|
||||||
proxyHandler.ServeHTTP(w, r)
|
proxyHandler.ServeHTTP(w, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Proxy mgmt server Registration & Authentication
|
||||||
r.Get("/api/inspect", proxyHandleFunc)
|
r.Get("/api/inspect", proxyHandleFunc)
|
||||||
|
r.Post("/api/register-device", proxyHandleFunc)
|
||||||
r.Post("/api/register-device/*", proxyHandleFunc)
|
r.Post("/api/register-device/*", proxyHandleFunc)
|
||||||
|
|
||||||
|
// Proxy mgmt server ACME DNS 01 Challenges
|
||||||
|
r.Get("/api/dns/*", proxyHandleFunc)
|
||||||
|
|
||||||
r.Route("/api", func(r chi.Router) {
|
r.Route("/api", func(r chi.Router) {
|
||||||
// TODO token needs a globally unique subject
|
// TODO token needs a globally unique subject
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue