-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: api http router improvements #38227
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
Open
d-gubert
wants to merge
6
commits into
chore/improve-livechat-customfield-endpoint
Choose a base branch
from
chore/router-improvements
base: chore/improve-livechat-customfield-endpoint
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e8e1db7
fix: schema definition POSTLivechatSaveCustomFieldsSchema
d-gubert 6e8ff92
refactor: parseBodyParams usage and types
d-gubert 1f578b7
refactor: defer payload parsing to getRestPayload
d-gubert 85fde0c
feat: add redaction to logger middleware
d-gubert 9068fca
fix: validatorFn mutates its parameter, pass clone instead
d-gubert 20ecbe8
revert: cloning data shoves real problems under the rug
d-gubert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 1182
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 48
🌐 Web query:
pino logger redact option nested paths syntax documentation💡 Result:
In Pino, the
redactoption takes an array (or{ paths, censor, remove }) where each entry inpathsis a string path written in JavaScript dot/bracket notation, with support for arrays and*wildcards. [2][1]Basic nested paths (dot / bracket)
a.b.c[1]a["b-c"].d[1]["a-b"].c[1]Arrays
users[0].password(redact first element’s password) [3]stuff.thats[*].secret[1]Wildcards (
*)a.b.*[1]users.*.password[4]Example
Path syntax is shared with Pino’s underlying redaction engine (
fast-redact). [1][3]Sources: Pino redaction docs (Path Syntax + examples) [1], Pino
redactAPI option docs [2], fast-redact path syntax details [3],@pinojs/redactpath/wildcard examples [4].🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 1639
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 1328
Use nested path to properly redact passwords:
redact: ['payload.password']The payload is wrapped in a
payloadkey, so top-levelredact: ['password']won't catch nested passwords. Use['payload.password']instead to redact passwords from the JSON body.🤖 Prompt for AI Agents