Skip to content

Commit

Permalink
ar(feat) [DPCP-37]: Localization
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloreale committed Aug 21, 2024
1 parent 450d4da commit 4089147
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const withNextIntl = createNextIntlPlugin('./src/app/[locale]/i18n.ts');
const nextConfig = {
assetPrefix:
(process.env.VERCEL_ENV && process.env.VERCEL_ENV !== 'production'
? process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: process.env.NEXUS_HOST) || 'https://nyx.dreampip.com',
transpilePackages: ['next-auth'],
images: {
Expand Down
4 changes: 3 additions & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export const config = {
const blocklist = ['_next'];

export default async function middleware(request: NextRequest) {
if (blocklist.some((pattern) => request?.nextUrl?.pathname?.includes(pattern))) {
const url = request?.nextUrl?.pathname
if (blocklist.some((pattern) => url?.includes(pattern))) {
console.log("--- PATTERN BOCKED: ---", url)
return NextResponse.next();
}
// if a response is returned, return it otherwise call `next()`
Expand Down

0 comments on commit 4089147

Please sign in to comment.