apps/api: read token from headers
This commit is contained in:
parent
6e323803bd
commit
1a7cf3f3c5
@ -11,7 +11,7 @@ export class AppController {
|
||||
@Get('auth')
|
||||
public async auth(@Req() req: FastifyRequest, @Res() reply: FastifyReply) {
|
||||
try {
|
||||
const token = req.cookies[env.COOKIE_TOKEN_NAME];
|
||||
const token = req.cookies[env.COOKIE_TOKEN_NAME] || req.headers.authorization.split(' ')[1];
|
||||
|
||||
this.appService.checkToken(token);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user