From ed85d11d966b80976ad5e9cf9bf26989b50f4f69 Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Fri, 24 Sep 2021 03:29:47 +0300 Subject: [PATCH] Testing auth UNDO BEFORE DEPLOY --- src/website/admin.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/website/admin.go b/src/website/admin.go index 780df1f0..1f96fdfb 100644 --- a/src/website/admin.go +++ b/src/website/admin.go @@ -40,6 +40,9 @@ func AdminAtomFeed(c *RequestContext) ResponseData { creds := fmt.Sprintf("%s:%s", config.Config.Admin.AtomUsername, config.Config.Admin.AtomPassword) expectedAuth := fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString([]byte(creds))) auth, hasAuth := c.Req.Header["Authorization"] + if hasAuth { + c.Logger.Warn().Str("auth", auth[0]).Msg("Got auth") + } if !hasAuth || auth[0] != expectedAuth { return FourOhFour(c) }