diff --git a/oauthproxy.go b/oauthproxy.go index c92eb850..ae5231f6 100644 --- a/oauthproxy.go +++ b/oauthproxy.go @@ -293,6 +293,7 @@ func buildRoutesAllowlist(opts *options.Options) ([]*allowedRoute, error) { if err != nil { return nil, err } + logger.Printf("Skipping auth - Method: ALL | Path: %s", path) routes = append(routes, &allowedRoute{ method: "", pathRegex: compiledRegex, @@ -318,6 +319,7 @@ func buildRoutesAllowlist(opts *options.Options) ([]*allowedRoute, error) { if err != nil { return nil, err } + logger.Printf("Skipping auth - Method: %s | Path: %s", method, path) routes = append(routes, &allowedRoute{ method: method, pathRegex: compiledRegex, diff --git a/oauthproxy_test.go b/oauthproxy_test.go index 53bc9543..e42033d1 100644 --- a/oauthproxy_test.go +++ b/oauthproxy_test.go @@ -2365,9 +2365,9 @@ func Test_buildRoutesAllowlist(t *testing.T) { if tc.shouldError { assert.Error(t, err) return - } else { - assert.NoError(t, err) } + assert.NoError(t, err) + for i, route := range routes { assert.Greater(t, len(tc.expectedMethods), i) assert.Equal(t, route.method, tc.expectedMethods[i])