Skip to content

Commit

Permalink
chore: Log invalid ISR tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Jan 29, 2024
1 parent 1b688f8 commit 3ebd18d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/docs/src/app/api/isr/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const ACCEPTED_TAGS = ['github', 'github-actions-status']
export async function GET(req: NextRequest) {
const token = req.nextUrl.searchParams.get('token')
if (token !== process.env.ISR_TOKEN) {
console.log('Invalid token `%s`', token)
return NextResponse.json({ error: 'Invalid token' }, { status: 400 })
}
const now = new Date()
Expand Down

0 comments on commit 3ebd18d

Please sign in to comment.