From be118a233f3873ce1e5eb52d46adccb3ef4c380c Mon Sep 17 00:00:00 2001 From: Wataru Ono Date: Wed, 9 Feb 2022 22:15:11 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=E3=83=95=E3=82=A9=E3=83=BC?= =?UTF-8?q?=E3=83=9E=E3=83=83=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prettier に従うため --- src/pages/_middleware.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/_middleware.ts b/src/pages/_middleware.ts index c693793..66130ff 100644 --- a/src/pages/_middleware.ts +++ b/src/pages/_middleware.ts @@ -7,7 +7,10 @@ export const middleware = (req: NextRequest) => { const auth = basicAuth.split(" ")[1]; const [user, password] = Buffer.from(auth, "base64").toString().split(":"); - if (user === process.env.BASIC_AUTH_USER && password === process.env.BASIC_AUTH_PASSWORD) { + if ( + user === process.env.BASIC_AUTH_USER && + password === process.env.BASIC_AUTH_PASSWORD + ) { return NextResponse.next(); } } @@ -16,6 +19,6 @@ export const middleware = (req: NextRequest) => { status: 401, headers: { "WWW-Authenticate": "Basic realm='Secure Area'", - } + }, }); };