Skip to content

Commit a67200b

Browse files
committed
Add _token to default redact keys
1 parent 05849c2 commit a67200b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

config/nightwatch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
'server' => env('NIGHTWATCH_SERVER', (string) gethostname()),
88
'capture_exception_source_code' => env('NIGHTWATCH_CAPTURE_EXCEPTION_SOURCE_CODE', true),
99
'capture_request_body' => env('NIGHTWATCH_CAPTURE_REQUEST_BODY', false),
10-
'redact_keys' => explode(',', env('NIGHTWATCH_REDACT_KEYS', 'password,password_confirmation')),
10+
'redact_keys' => explode(',', env('NIGHTWATCH_REDACT_KEYS', '_token,password,password_confirmation')),
1111
'redact_headers' => explode(',', env('NIGHTWATCH_REDACT_HEADERS', 'Authorization,Cookie,Proxy-Authorization,X-XSRF-TOKEN')),
1212

1313
'sampling' => [

src/NightwatchServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ private function buildAndRegisterCore(): void
255255
),
256256
captureExceptionSourceCode: (bool) ($this->nightwatchConfig['capture_exception_source_code'] ?? true),
257257
captureRequestBody: (bool) ($this->nightwatchConfig['capture_request_body'] ?? false),
258-
redactKeys: $this->nightwatchConfig['redact_keys'] ?? ['password', 'password_confirmation'],
258+
redactKeys: $this->nightwatchConfig['redact_keys'] ?? ['_token', 'password', 'password_confirmation'],
259259
redactHeaders: $this->nightwatchConfig['redact_headers'] ?? ['Authorization', 'Cookie', 'Proxy-Authorization', 'X-XSRF-TOKEN'],
260260
config: $this->config,
261261
),

0 commit comments

Comments
 (0)