Skip to content

Commit

Permalink
chore: fjern unødvendig middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
eskilgh committed Oct 24, 2024
1 parent 13af37d commit 7b87563
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ export function middleware(request: NextRequest): NextResponse | void {
logger.info('Hit old ingress, redirecting to new ingress')
return NextResponse.redirect(new URL(url.pathname, 'https://helsesjekk-bot.nav.no/'))
}

// Make sure everyone is authed now that it's on a public ingress
if (!isLocal && !request.headers.has('Authorization')) {
return NextResponse.redirect(new URL(`/oauth2/login?redirect=${url.pathname}`, request.url))
}
}

// See "Matching Paths" below to learn more
Expand Down

0 comments on commit 7b87563

Please sign in to comment.