-
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.
Merge branch 'master' into test-strict-equal
- Loading branch information
Showing
11 changed files
with
472 additions
and
29 deletions.
There are no files selected for viewing
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,37 @@ | ||
--- | ||
'@seek/logger': minor | ||
--- | ||
|
||
Omit request headers | ||
|
||
`@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
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
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
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
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
Oops, something went wrong.