proxy: add logo discovery (#5448)

* proxy: add logo discovery

* use a static url for testing
This commit is contained in:
Caleb Doxsey 2025-01-29 12:57:26 -07:00 committed by GitHub
parent 936bd28ae4
commit 3c5c7fbd31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 295 additions and 4 deletions

View file

@ -21,6 +21,7 @@ import (
"github.com/pomerium/pomerium/internal/telemetry/metrics"
"github.com/pomerium/pomerium/internal/telemetry/trace"
"github.com/pomerium/pomerium/pkg/cryptutil"
"github.com/pomerium/pomerium/proxy/portal"
)
const (
@ -60,6 +61,7 @@ type Proxy struct {
currentRouter *atomicutil.Value[*mux.Router]
webauthn *webauthn.Handler
tracerProvider oteltrace.TracerProvider
logoProvider portal.LogoProvider
}
// New takes a Proxy service from options and a validation function.
@ -76,6 +78,7 @@ func New(ctx context.Context, cfg *config.Config) (*Proxy, error) {
state: atomicutil.NewValue(state),
currentOptions: config.NewAtomicOptions(),
currentRouter: atomicutil.NewValue(httputil.NewRouter()),
logoProvider: portal.NewLogoProvider(),
}
p.OnConfigChange(ctx, cfg)
p.webauthn = webauthn.New(p.getWebauthnState)