Skip to content

Commit

Permalink
refactor: フォーマット
Browse files Browse the repository at this point in the history
Prettier に従うため
  • Loading branch information
watagit committed Feb 9, 2022
1 parent b890024 commit be118a2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pages/_middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand All @@ -16,6 +19,6 @@ export const middleware = (req: NextRequest) => {
status: 401,
headers: {
"WWW-Authenticate": "Basic realm='Secure Area'",
}
},
});
};

0 comments on commit be118a2

Please sign in to comment.