mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-18 03:27:16 +02:00
all: support route scoped sessions
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
83342112bb
commit
d3d60d1055
53 changed files with 2092 additions and 2416 deletions
|
@ -172,7 +172,10 @@ func Test_UpdateOptions(t *testing.T) {
|
|||
corsPreflight.Policies = []config.Policy{{To: "http://foo.example", From: "http://bar.example", CORSAllowPreflight: true}}
|
||||
disableAuth := testOptions(t)
|
||||
disableAuth.Policies = []config.Policy{{To: "http://foo.example", From: "http://bar.example", AllowPublicUnauthenticatedAccess: true}}
|
||||
|
||||
fwdAuth := testOptions(t)
|
||||
fwdAuth.ForwardAuthURL = &url.URL{Scheme: "https", Host: "corp.example.example"}
|
||||
reqHeaders := testOptions(t)
|
||||
reqHeaders.Policies = []config.Policy{{To: "http://foo.example", From: "http://bar.example", SetRequestHeaders: map[string]string{"x": "y"}}}
|
||||
tests := []struct {
|
||||
name string
|
||||
originalOptions config.Options
|
||||
|
@ -198,6 +201,8 @@ func Test_UpdateOptions(t *testing.T) {
|
|||
{"no websockets, custom timeout", good, customTimeout, "", "https://corp.example.example", false, true},
|
||||
{"enable cors preflight", good, corsPreflight, "", "https://corp.example.example", false, true},
|
||||
{"disable auth", good, disableAuth, "", "https://corp.example.example", false, true},
|
||||
{"enable forward auth", good, fwdAuth, "", "https://corp.example.example", false, true},
|
||||
{"set request headers", good, reqHeaders, "", "https://corp.example.example", false, true},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue