Open lionel-addvanto opened 2 weeks ago
Hey there,
The main intention behind Basic Auth in this module is to block accessing certain page/subpages but it also works for all server endpoints which does not render any route.
Have you maybe tried excluding this server route in exclude
option? https://nuxt-security.vercel.app/documentation/middleware/basic-auth#exclude
There is also an issue for route based Basic Auth but it was not implemented yet - https://github.com/Baroshem/nuxt-security/issues/443. Maybe you would be interested in contributing? :)
Hello, I have the newest Nuxt (v3.14.159) and nuxt-security (v2.0.0) packages . When I call
useFetch
to a server route, in a page, where SWR is enabled, I get a 401 because of the http basic auth. When I manually include the headers in the request it works, but what is the Nuxt/nuxt-security intended way to do this?Thank you and kind regards