Skip to content

Commit

Permalink
docs: Do not require authentication to view documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
magarpratik authored and frankie567 committed Dec 19, 2024
1 parent 6e7e0f0 commit af55df2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clients/apps/web/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ const AUTHENTICATED_ROUTES = [
]

const requiresAuthentication = (request: NextRequest): boolean => {
if (
request.nextUrl.hostname === 'docs.polar.sh' ||
request.nextUrl.pathname.startsWith('/docs/')
) {
return false
}

return AUTHENTICATED_ROUTES.some((route) =>
route.test(request.nextUrl.pathname),
)
Expand Down

0 comments on commit af55df2

Please sign in to comment.