-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
I added sentry to my project and within days I had hundreds and hundreds of Unauthorized errors coming up.
After investigating I arrived to the conclusion that:
nuxt-auth-utils throws `Unauthorized (/api/_auth/session)` on any 404 page
So since bots scan for /wp-admin etc I get a ton of these.
This is a small reproduction (create a nitro plugin):
// server/plugins/server_error_handler.js
export default defineNitroPlugin((nitroApp) => {
nitroApp.hooks.hook('error', (err, context) => {
console.error(`${err?.message || "Server Error"} (${context?.event?.path})
}
})Open any 404 page like /api/does-not-exists or even client pages like /does-not-exists
The console will show:
ERROR Unauthorized (/api/_auth/session)
Not sure why this is happening but it doesn't seem like a normal behavior.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested