Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When i try to build with this package get error #10

Open
emirhanyagci opened this issue Aug 14, 2024 · 2 comments
Open

When i try to build with this package get error #10

emirhanyagci opened this issue Aug 14, 2024 · 2 comments

Comments

@emirhanyagci
Copy link

When i add this package to my project its working on developement but when try to build project i get those errors
while building
image

these are what i just do only adding these to nuxt.config.ts nothing more when delete these it is working

  modules: [
    '@kgierke/nuxt-basic-auth',
  ],
 basicAuth: {
    enabled: true,
    users: [
      {
        username: 'admin',
        password: 'admin',
      },
    ],
  },
@kgierke
Copy link
Owner

kgierke commented Aug 14, 2024

Hi, for now this issue should be resolved by allowing the api/* routes using the allowedRoutes option, e.g.

export default defineNuxtConfig({
  modules: ["@kgierke/nuxt-basic-auth"],

  basicAuth: {
    enabled: true,
    users: [
      {
        username: "admin",
        password: "admin",
      },
    ],
    // Optional: Whitelist routes
    // allowedRoutes: ["/api/.*"],
  },
});

I will look into improving the behavior together with nuxt content soon.

@emirhanyagci
Copy link
Author

Okay thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants