diff --git a/internal/auth/auth.go b/internal/auth/auth.go index a85b081..bb36eed 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -31,7 +31,7 @@ func (a *Authenticater) GenerateCookie() (*http.Cookie, error) { Name: "token", Value: v, } - slog.Info("generate cookie", "value", v) + err := a.AuthStore.InsertCookieValue(v) if err != nil { slog.Error("failed to store new cookie", "err", err) @@ -46,7 +46,6 @@ func (a *Authenticater) IsValidCookie(r *http.Request) (ok bool, err error) { if err != nil { // unknown error: http: named cookie not present // token の key がない場合もここに落ちるので、この場合は ok = false とする - slog.Info("undetected cookie: token") return false, nil } v := token.Value diff --git a/internal/server/proxy.go b/internal/server/proxy.go index 2af1b8a..1233337 100644 --- a/internal/server/proxy.go +++ b/internal/server/proxy.go @@ -73,6 +73,7 @@ func (s *Server) proxyMain(w http.ResponseWriter, r *http.Request) (resultCode P return ProxyResultInternalError } http.SetCookie(w, cookie) + slog.Info("generate cookie", "request_id", reqId) } respBody := []byte("")