Skip to content

Commit

Permalink
Ensure that when exclusion is not configured, access to the entire gl…
Browse files Browse the repository at this point in the history
…obal site is permitted, with only the inclusion criteria taking effect.
  • Loading branch information
rathahin committed Oct 31, 2023
1 parent c89ae55 commit d8df6ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/server/middleware/basicAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineEventHandler((event) => {
const basicAuthConfig = securityConfig.basicAuth

// Check for exclusion paths
const excludePaths = basicAuthConfig?.exclude || []
const excludePaths = basicAuthConfig?.exclude || ['/']
const isPathExcluded = excludePaths.some(el => event.path?.startsWith(el))

// Check for inclusion paths
Expand Down

0 comments on commit d8df6ed

Please sign in to comment.