Skip to content

Commit

Permalink
fix(web): nextjs doesn't support configDir yet
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Jun 22, 2024
1 parent 49fb668 commit 88e283d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const unkey =
rootKey: env.UNKEY_ROOT_KEY,
namespace: env.UNKEY_NAMESPACE,
limit: 10,
duration: '20s',
duration: '5s',
async: true,
})
: undefined
Expand All @@ -37,7 +37,7 @@ export default async function middleware(
const ratelimit = await unkey.limit(ip)

if (!ratelimit.success) {
return NextResponse.redirect(new URL('/blocked'))
return NextResponse.redirect(new URL('/blocked', request.url))
}
}

Expand Down
29 changes: 28 additions & 1 deletion apps/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
{
"extends": ["@orbitkit/tsconfig/next.json"]
"extends": ["@orbitkit/tsconfig/next.json"],
"compilerOptions": {
"plugins": [
{
"name": "next"
}
],
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"include": [
"next-env.d.ts",
".next/types/**/*.ts",
"**/*.ts",
"**/*.tsx",
"**/*.cts",
"**/*.ctsx",
"**/*.mts",
"**/*.mtsx",
"**/*.js",
"**/*.jsx",
"**/*.cjs",
"**/*.cjsx",
"**/*.mjs",
"**/*.mjsx"
]
}

0 comments on commit 88e283d

Please sign in to comment.