git.iko.soy/typeable/oauth2-proxy
on master help sign in
Add startup logging for skipped auth routes
commit89a8ac8c1f4995e270b8db3f6b71b28fc95ef780 authorNick Meves <nick.meves@greenhouse.io> dateSat 26 Sep 2020, 12:38 (6 years ago) parentfa4ba5e
2 files changed+4−2
oauthproxy.go+2 oauthproxy_test.go+2−2
oauthproxy.go+2
@@ -293,6 +293,7 @@ func buildRoutesAllowlist(opts *options.Options) ([]*allowedRoute, error) {
293293 if err != nil {
294294 return nil, err
295295 }
296+ logger.Printf("Skipping auth - Method: ALL | Path: %s", path)
296297 routes = append(routes, &allowedRoute{
297298 method: "",
298299 pathRegex: compiledRegex,
@@ -318,6 +319,7 @@ func buildRoutesAllowlist(opts *options.Options) ([]*allowedRoute, error) {
318319 if err != nil {
319320 return nil, err
320321 }
322+ logger.Printf("Skipping auth - Method: %s | Path: %s", method, path)
321323 routes = append(routes, &allowedRoute{
322324 method: method,
323325 pathRegex: compiledRegex,
oauthproxy_test.go+2−2
@@ -2365,9 +2365,9 @@ func Test_buildRoutesAllowlist(t *testing.T) {
23652365 if tc.shouldError {
23662366 assert.Error(t, err)
23672367 return
2368− } else {
2369− assert.NoError(t, err)
23702368 }
2369+ assert.NoError(t, err)
2370+
23712371 for i, route := range routes {
23722372 assert.Greater(t, len(tc.expectedMethods), i)
23732373 assert.Equal(t, route.method, tc.expectedMethods[i])