2f60b81962b2f665e26a0b130086554356794207
sessionFromCookie already writes "session expired" when a cookie was presented and rejected with no bearer to fall through to. Middleware called sessionFromToken anyway, which wrote a second "not authenticated" body onto the same response for every ordinary browser-session timeout - gin logged "superfluous response.WriteHeader call" on ordinary use, not a rare edge case. Guard on c.IsAborted() after sessionFromCookie: true only in that one rejected-cookie-no-bearer branch, so it short-circuits there while the other three credential paths (no credential, bearer only, stale cookie plus valid bearer) are unaffected.
Description
No description provided
9.7 MiB
Languages
JavaScript
63.9%
Go
19.3%
TypeScript
16.6%