-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Add hidden fields option to sanitizing #4914
Add hidden fields option to sanitizing #4914
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM this is a nice addition thank you 👍
As a side note @lambertkevin because I know the Strapi team will say it, can you please add documentation for this? https://github.com/strapi/strapi/blob/master/docs/3.0.0-beta.x/concepts/configurations.md |
THanks for your contribution. I’ll take a look at i later. |
packages/strapi-generate-new/lib/resources/files/config/environments/production/response.json
Outdated
Show resolved
Hide resolved
The |
@alexandrebodin Ok removed the default configs and added example to the documentation |
Thanks for the update. I meant remove the |
@@ -8,5 +8,6 @@ | |||
"poweredBy": { | |||
"enabled": true, | |||
"value": "Strapi <strapi.io>" | |||
} | |||
}, | |||
"hiddenFields": [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this hiddenFields from the config
Hi @lambertkevin do you think you will be able to make the last changes ? Thanks ! |
Hi @lambertkevin I'm going to close this PR for now until you can make the changes ;). |
Description of what you did:
Added a
hiddenFields
attribute to the response config in order to sanitize entities globally. It will help preventing default values from appearing on every responses of every entities. (e.g.__v
or timestamps when using mongodb).Fix #4342
My PR is a:
Main update on the:
Manual testing done on the following databases: