QuarkGluonPlasma / nestjs-course-code

《Nest 通关秘籍》案例代码

Home Page:https://juejin.cn/book/7226988578700525605

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

应该是小写的accept

shylockWu opened this issue · comments

return key ? request.headers[key] : request.headers;

通过const request: Request = ctx.switchToHttp().getRequest();拿到的request中的属性都变成小写了

所以应该是

return key ? request.headers[key.toLocaleLowerCase()] : request.headers;