Skip to content

Commit

Permalink
feat(nano-server): clear debug info from client for security reasons.
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Dec 18, 2022
1 parent 02639a2 commit 5814af2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/nano-server/src/nano-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ export class AlwatrConnection {
throw new Error('http_header_sent');
}

if (!this._logger.debug && !content.ok && content.meta) {
// clear debug info from client for security reasons.
delete content.meta;
}

let buffer: Buffer;

try {
Expand Down

0 comments on commit 5814af2

Please sign in to comment.