Skip to content

Commit

Permalink
feat: remove logging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
PAYNEA03 committed Aug 12, 2024
1 parent 6b414f9 commit 79ea2cf
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@ import type { NextRequest } from 'next/server';
import { NextResponse } from 'next/server';

export function middleware(request: NextRequest) {
console.log('hostname');
console.log(process.env.HOSTNAME);

console.log('call1');
console.log(request.url);
console.log(request.nextUrl.pathname);
console.log('');

let response;
let response = NextResponse.next();

if (request.nextUrl.pathname.startsWith('/api/resourcing')) {
const newUrl = new URL(request.url);
Expand All @@ -21,24 +13,8 @@ export function middleware(request: NextRequest) {

response = NextResponse.rewrite(newUrl);

console.log('call3');
console.log(response);
console.log('');

return response;
}

console.log('call2');

console.log(request.url);
console.log(request.nextUrl.pathname);
console.log();

response = NextResponse.next();

console.log('call4');
console.log(response);
console.log();

return response;
}

0 comments on commit 79ea2cf

Please sign in to comment.