-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06aa31a
commit 73625e5
Showing
3 changed files
with
40 additions
and
38 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# @seek/logger | ||
|
||
## 6.2.0 | ||
|
||
### Minor Changes | ||
|
||
- Omit request headers ([#92](https://github.com/seek-oss/logger/pull/92)) | ||
|
||
`@seek/logger` now omits the following properties from `headers` and `req.headers` by default: | ||
|
||
- `x-envoy-attempt-count` | ||
- `x-envoy-decorator-operation` | ||
- `x-envoy-expected-rq-timeout-ms` | ||
- `x-envoy-external-address` | ||
- `x-envoy-internal` | ||
- `x-envoy-peer-metadata` | ||
- `x-envoy-peer-metadata-id` | ||
- `x-envoy-upstream-service-time` | ||
|
||
If you would like to opt out of this behaviours, you can provide an empty list or your own list of request headers to `omitHeaderNames`: | ||
|
||
```diff | ||
const logger = createLogger({ | ||
name: 'my-app', | ||
+ omitHeaderNames: ['dnt', 'sec-fetch-dest'], | ||
}); | ||
``` | ||
|
||
You can also extend the default list like so: | ||
|
||
```diff | ||
- import createLogger from '@seek/logger'; | ||
+ import createLogger, { DEFAULT_OMIT_HEADER_NAMES } from '@seek/logger'; | ||
|
||
const logger = createLogger({ | ||
name: 'my-app', | ||
+ omitHeaderNames: [...DEFAULT_OMIT_HEADER_NAMES, 'dnt', 'sec-fetch-dest'] | ||
}); | ||
``` |
This file contains 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