Skip to content

Commit

Permalink
Better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Inkvi committed Mar 12, 2024
1 parent cc45ac9 commit b88fc3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/cache/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function GET(request: NextRequest) {
const AUTH_TOKEN = process.env.AUTH_TOKEN;

if (!isLocalEnv() && request.headers.get('Authorization') !== `Bearer ${AUTH_TOKEN}`) {
console.error('Unauthorized request');
console.warn(`Unauthorized request to /api/cache with auth token ${request.headers.get('Authorization')}`);
return NextResponse.error();
}

Expand Down

0 comments on commit b88fc3f

Please sign in to comment.