Skip to content

Commit

Permalink
Merge branch 'main' into allow-external-navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser authored Oct 11, 2023
2 parents 576bed2 + 6434f53 commit 38d9ad4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/middleware/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default defineNuxtRouteMiddleware((to) => {
* - avoid the `Error [ERR_HTTP_HEADERS_SENT]`-error that occurs when we redirect to the sign-in page when the original to-page does not exist. Likely related to https://github.com/nuxt/framework/issues/9438
*
*/
if (authConfig.globalAppMiddleware.allow404WithoutAuth) {
if (authConfig.globalAppMiddleware.allow404WithoutAuth || authConfig.globalAppMiddleware === true) {
const matchedRoute = to.matched.length > 0
if (!matchedRoute) {
// Hands control back to `vue-router`, which will direct to the `404` page
Expand Down
2 changes: 2 additions & 0 deletions src/runtime/utils/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,7 @@ export const determineCallbackUrl = <T extends string | Promise<string>>(authCon
return getOriginalTargetPath()
}
}
} else if (authConfig.globalAppMiddleware === true) {
return getOriginalTargetPath()
}
}

0 comments on commit 38d9ad4

Please sign in to comment.