Allow custom binding for trust center
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user