Skip to content

Commit

Permalink
fix route
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-cb committed Sep 12, 2024
1 parent 5a8a6b5 commit 4cee9e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/api/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const BLOCKED_COUNTRIES = [
];

export const config = {
matcher: ['/'],
matcher: ['/(.*)'],
};

export default function middleware(request: Request) {
Expand All @@ -28,9 +28,7 @@ export default function middleware(request: Request) {
BLOCKED_COUNTRIES.includes(countryCode)
) {
console.log(`Country ${countryCode} is blocked`)
return Response.json(
{ message: "AI agent app not available in your country" },
);
return new Response('AI agent app not available in your country', { status: 403 });
}

return next();
Expand Down

0 comments on commit 4cee9e1

Please sign in to comment.