New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update path aliases and move logger #474
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #474 +/- ##
========================================
- Coverage 47.3% 47.3% -0.0%
========================================
Files 425 425
Lines 44389 44446 +57
Branches 597 598 +1
========================================
+ Hits 20988 21006 +18
- Misses 23390 23429 +39
Partials 11 11
|
src/middlewares/initSession.ts
Outdated
@@ -141,10 +141,11 @@ export const initSession = async (req: NextRequest, res: NextResponse) => { | |||
if (isValidToken(token)) { | |||
session.token = token; | |||
session.isAuthenticated = isAuthenticated(token); | |||
res.cookies.set(process.env.ADS_SESSION_COOKIE_NAME, headers.get('set-cookie') ?? ''); | |||
log.debug({ msg: 'headers', headers: headers.entries() }); | |||
const sessionCookieValue = headers.get('set-cookie').split('=')[1] ?? ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possible undefined
value on headers.get('set-cookie')
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just that one comment to confirm no undefined
error
This changes the root path alias from
@
to@/
which shows more explicitly project files vs external libs that might use that same syntax