From 3856dba38cf84685e6f6a52ee5adccaaf71e8703 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Fri, 10 Oct 2025 11:43:31 +0200 Subject: [PATCH] Allow custom binding for trust center Signed-off-by: Bryan Frimin --- pkg/probod/probod.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkg/probod/probod.go b/pkg/probod/probod.go index db1ec5e9e..7cd7aa5aa 100644 --- a/pkg/probod/probod.go +++ b/pkg/probod/probod.go @@ -67,6 +67,7 @@ type ( Api apiConfig `json:"api"` Auth authConfig `json:"auth"` TrustAuth trustAuthConfig `json:"trust-auth"` + TrustCenter trustCenterConfig `json:"trust-center"` AWS awsConfig `json:"aws"` Mailer mailerConfig `json:"mailer"` Connectors []connectorConfig `json:"connectors"` @@ -74,6 +75,11 @@ type ( ChromeDPAddr string `json:"chrome-dp-addr"` CustomDomains customDomainsConfig `json:"custom-domains"` } + + trustCenterConfig struct { + HTTPAddr string `json:"http-addr"` + HTTPSAddr string `json:"https-addr"` + } ) var ( @@ -120,6 +126,10 @@ func New() *Implm { Scope: "trust_center_readonly", TokenType: "trust_center_access", }, + TrustCenter: trustCenterConfig{ + HTTPAddr: ":80", + HTTPSAddr: ":443", + }, AWS: awsConfig{ Region: "us-east-1", Bucket: "probod", @@ -557,7 +567,7 @@ func (impl *Implm) runTrustCenterServer( ) httpServer := httpserver.NewServer( - ":80", + impl.cfg.TrustCenter.HTTPAddr, httpACMEHandler.Handle(http.NotFoundHandler()), httpserver.WithLogger(l), httpserver.WithRegisterer(r), @@ -591,7 +601,7 @@ func (impl *Implm) runTrustCenterServer( handler := acmeHandler.Handle(trustRouter) httpsServer := httpserver.NewServer( - ":443", + impl.cfg.TrustCenter.HTTPSAddr, handler, httpserver.WithLogger(l), httpserver.WithRegisterer(r),