Skip to content

Commit

Permalink
Merge pull request #470 from lsst-epo/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ericdrosas87 authored Jun 11, 2024
2 parents 3875da4 + c7581a1 commit 839f7ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ export function middleware(request) {
redirectUrl.pathname = redirectPath;

logEntry.httpRequest.redirected = true;
console.info(logEntry);
console.info(JSON.stringify(logEntry));
return NextResponse.redirect(redirectUrl);
}
}

const res = NextResponse.next();
logEntry.httpRequest.status = res.status;
logEntry.httpRequest.redirected = res.redirected;
console.info(logEntry);
console.info(JSON.stringify(logEntry));
return res;
}
}

// Match anything and let the middleware decide to redirect or log
export const config = {
matcher: "/((?!_____).*)",
matcher: "/((?!localhost).*)",
};

0 comments on commit 839f7ed

Please sign in to comment.