From 2de7e14e1c5fcc8c846b341583597ab65eaf7156 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 21 Jun 2021 11:56:41 -0600 Subject: [PATCH] acmeserver: Trim slashes from path prefix See https://caddy.community/t/mtls-tls-internal-error/12807 --- modules/caddypki/acmeserver/acmeserver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/caddypki/acmeserver/acmeserver.go b/modules/caddypki/acmeserver/acmeserver.go index e6399eaa..7f9195ec 100644 --- a/modules/caddypki/acmeserver/acmeserver.go +++ b/modules/caddypki/acmeserver/acmeserver.go @@ -150,9 +150,9 @@ func (ash *Handler) Provision(ctx caddy.Context) error { // create the router for the ACME endpoints acmeRouterHandler := acmeAPI.NewHandler(acmeAPI.HandlerOptions{ CA: auth, - DB: acmeDB, // stores all the server state - DNS: ash.Host, // used for directory links; TODO: not needed (follow-up upstream with step-ca) - Prefix: ash.PathPrefix, // used for directory links + DB: acmeDB, // stores all the server state + DNS: ash.Host, // used for directory links; TODO: not needed (follow-up upstream with step-ca) + Prefix: strings.Trim(ash.PathPrefix, "/"), // used for directory links }) // extract its http.Handler so we can use it directly