Skip to content

Commit

Permalink
Update middleware.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
DinerIsmail committed Oct 1, 2023
1 parent f1ac7bd commit 1d2b980
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion middleware.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable sonarjs/cognitive-complexity */
import { NextResponse } from 'next/server'

import type { NextRequest } from 'next/server'

export default function middleware(req: NextRequest) {
Expand All @@ -27,6 +26,8 @@ export default function middleware(req: NextRequest) {
.replace('.vercel.app', '')
: hostname.replace(`.localhost:3000`, '')

console.log('DINER', { hostname, currentHost, pathname })

if (pathname.startsWith(`/_webs`)) {
return new Response(null, {
status: 404,
Expand Down Expand Up @@ -63,3 +64,4 @@ export default function middleware(req: NextRequest) {
}



0 comments on commit 1d2b980

Please sign in to comment.