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

The default behavior of removeLoggers is not correctly documented #570

Open
guenbakku opened this issue Nov 27, 2024 · 2 comments · May be fixed by #560
Open

The default behavior of removeLoggers is not correctly documented #570

guenbakku opened this issue Nov 27, 2024 · 2 comments · May be fixed by #560
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@guenbakku
Copy link

Version

nuxt-security: 2.1.4
nuxt: 3.14.1592

Reproduction Link

Blank project without removeLoggers specified or set to true

// nuxt.config.ts
export default defineNuxtConfig({
  security: {},
  // or 
  // security: { removeLoggers: true },
});

Steps to reproduce

Configure the nuxt.config.ts like above and access to nuxt app in production mode.
(In my case, i used nuxt generate to generate a static site)

What is Expected?

Only the log and debug logger are removed as described in the document:

Fortunately, nuxt-security module removes both log and debug console outputs by default so your application is not leaking this information.
ref: https://nuxt-security.vercel.app/documentation/utils/remove-console-loggers#:~:text=nuxt%2Dsecurity%20module%20removes%20both%20log%20and%20debug

What is actually happening?

All the loggers (included warn and error) are removed.

@guenbakku guenbakku added the bug Something isn't working label Nov 27, 2024
@vejja
Copy link
Collaborator

vejja commented Nov 27, 2024

Hi @guenbakku
Your are right
This is a documentation issue. All console.* are removed in v2.1+
Our docs are lagging a bit, they will get back in sync once we merge #560

@vejja vejja linked a pull request Nov 27, 2024 that will close this issue
@vejja vejja added documentation Improvements or additions to documentation and removed bug Something isn't working labels Nov 27, 2024
@guenbakku
Copy link
Author

Hi @vejja
Thanks for your quick reply. I got it!

@vejja vejja assigned vejja and Baroshem and unassigned vejja Nov 27, 2024
@vejja vejja changed the title The default behavior of removeLoggers is not same with the document The default behavior of removeLoggers is not correctly documented Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants