Skip to content

Commit

Permalink
fixed auth check on urls with startsWith (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhanW3 authored Dec 7, 2023
1 parent e8e57f8 commit afd03a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/server/middleware/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ export const withAuth = async (server: FastifyInstance) => {
req.url === "/health" ||
req.url === "/static" ||
req.url === "/json" ||
req.url === "/auth/payload" ||
req.url === "/auth/login" ||
req.url === "/auth/user" ||
req.url === "/auth/switch-account" ||
req.url === "/auth/logout" ||
req.url === "/transaction/status"
req.url.startsWith("/auth/payload") ||
req.url.startsWith("/auth/login") ||
req.url.startsWith("/auth/user") ||
req.url.startsWith("/auth/switch-account") ||
req.url.startsWith("/auth/logout") ||
req.url.startsWith("/transaction/status")
) {
// We skip auth check for static endpoints and auth routes
return;
Expand Down

0 comments on commit afd03a3

Please sign in to comment.