Skip to content

Commit

Permalink
Merge pull request #896 from snyk/fix/decommission-body-logging
Browse files Browse the repository at this point in the history
chore: disable body logging
  • Loading branch information
aarlaud authored Dec 18, 2024
2 parents ca6b193 + d1f8e65 commit fb9a897
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client/config/configHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const getClientConfigMetadata = (
version: `${version}`,
haMode: highAvailabilityModeEnabled(clientConfig),
debugMode: clientConfig.logLevel === 'debug' ? true : false,
bodyLogMode: clientConfig.logEnableBody ? true : false,
bodyLogMode: clientConfig.logEnableBody === 'true' ? true : false,
credPooling: isCredPoolingUsed(clientConfig),
privateCa: clientConfig.nodeExtraCaCert ? true : false,
tlsReject:
Expand Down
2 changes: 2 additions & 0 deletions lib/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export const main = async (clientOpts: ClientOpts) => {
logger.info({ version }, 'Broker starting in client mode');
let hookResults: HookResults = {};
clientOpts.config.brokerClientId = uuidv4();
clientOpts.config.logEnableBody = 'false';
clientOpts.config.LOG_ENABLE_BODY = 'false';
logger.info(
{ brokerClientId: clientOpts.config.brokerClientId },
'generated broker client id',
Expand Down
1 change: 1 addition & 0 deletions test/functional/server-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ describe('proxy requests originating from behind the broker server', () => {
process.env.BROKER_SERVER_URL = `http://localhost:${PORT}`;
process.env.JIRAUSER = 'user';
process.env.PASS = 'pass';
process.env.LOG_ENABLE_BODY = 'true'; // setting this to true to assert it connects with it disabled

tws = await createTestWebServer();

Expand Down

0 comments on commit fb9a897

Please sign in to comment.