mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-17 12:33:22 +00:00
get access token from cookie instead of auth header
This commit is contained in:
10
src/infrastructure/middlewares/logs-middleware.ts
Normal file
10
src/infrastructure/middlewares/logs-middleware.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Injectable, NestMiddleware } from '@nestjs/common'
|
||||
import { Request, Response, NextFunction } from 'express'
|
||||
|
||||
@Injectable()
|
||||
export class LoggerMiddleware implements NestMiddleware {
|
||||
use(req: Request, res: Response, next: NextFunction) {
|
||||
console.log('Received cookies:', JSON.stringify(req.cookies))
|
||||
next()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user