From 585c6f6b288ce81f85dcff7911c22ca37a677433 Mon Sep 17 00:00:00 2001 From: Jeremy Yin Date: Mon, 17 Jun 2019 23:09:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E8=AF=B7=E6=B1=82=E9=87=8C=E9=9D=A2?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=B7=BB=E5=8A=A0headers=EF=BC=8CAu?= =?UTF-8?q?thorization=E5=92=8CX-Hello=EF=BC=8C=E7=A8=8B=E5=BA=8F=E6=94=B6?= =?UTF-8?q?=E5=88=B0=E7=9A=84=E6=98=AF=E5=B0=8F=E5=86=99=E7=9A=84authoriza?= =?UTF-8?q?tion=E5=8F=8Ax-hello=EF=BC=8C=E8=A3=85=E9=A5=B0=E5=99=A8?= =?UTF-8?q?=E4=B8=8D=E5=8A=A0=E5=8F=82=E6=95=B0=E6=98=AF=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=EF=BC=8C=E5=8A=A0=E5=8F=82=E6=95=B0=E6=98=AF?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=9F=90=E4=B8=80=E4=B8=AA=E5=A4=B4=E9=83=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=EF=BC=8C=E8=8E=B7=E5=8F=96=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E6=80=8E=E4=B9=88=E6=8B=BF=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/posts/posts.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posts/posts.controller.ts b/src/posts/posts.controller.ts index beb6a49..90cf430 100644 --- a/src/posts/posts.controller.ts +++ b/src/posts/posts.controller.ts @@ -3,7 +3,7 @@ import { Controller, Get, Req, Query, Headers } from '@nestjs/common'; @Controller('posts') export class PostsController { @Get() - index(@Headers() headers, @Query() query) { + index(@Headers('authorization') headers, @Query() query) { console.log(headers) console.log(query) return [