mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 08:19:23 +02:00
proxy: restrict programmatic URLs to localhost (#2049)
Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
This commit is contained in:
parent
0635c838c9
commit
c7d243d742
14 changed files with 822 additions and 126 deletions
|
@ -33,6 +33,8 @@ type proxyState struct {
|
|||
sessionStore sessions.SessionStore
|
||||
sessionLoaders []sessions.SessionLoader
|
||||
jwtClaimHeaders config.JWTClaimHeaders
|
||||
|
||||
programmaticRedirectDomainWhitelist []string
|
||||
}
|
||||
|
||||
func newProxyStateFromConfig(cfg *config.Config) (*proxyState, error) {
|
||||
|
@ -81,6 +83,7 @@ func newProxyStateFromConfig(cfg *config.Config) (*proxyState, error) {
|
|||
header.NewStore(state.encoder, httputil.AuthorizationTypePomerium),
|
||||
queryparam.NewStore(state.encoder, "pomerium_session"),
|
||||
}
|
||||
state.programmaticRedirectDomainWhitelist = cfg.Options.ProgrammaticRedirectDomainWhitelist
|
||||
|
||||
return state, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue