diff --git a/config.go b/config.go index 07b448370e272e2c47e4ca28bbc2f3726564b77d..a5f1f784c11dbba0e50f1ea2b0d456976b28d0f5 100644 --- a/config.go +++ b/config.go @@ -219,7 +219,7 @@ func readOptions(cx *cli.Context, config *Config) (err error) { config.CORS.MaxAge = cx.Duration("cors-max-age") } if cx.IsSet("cors-credentials") { - config.CORS.MaxAge = cx.BoolT("cors-credentials") + config.CORS.Credentials = cx.BoolT("cors-credentials") } if cx.IsSet("tag") { config.TagData, err = decodeKeyPairs(cx.StringSlice("tag")) diff --git a/server_test.go b/server_test.go index 80a1aabfa5f850e92de6ecc573c54be24b67e108..2a0303f55b430e03cbd778da2a37401c0b8a8ffa 100644 --- a/server_test.go +++ b/server_test.go @@ -94,7 +94,7 @@ func newFakeKeycloakProxy(t *testing.T) *KeycloakProxy { Roles: []string{}, }, }, - CORSConfig: &CORS{}, + CORS: &CORS{}, }, proxy: new(fakeReverseProxy), }