X-Audit header
Add custom fields to logs
If you want to add more information to logs, you can use X-Audit header in the format base64(json) — all properties from this json will be added to w/req and w/resp logs.
1
POST /Operation
2
X-Audit: eyJyb2xlIjogIm51cnNlIn0=
3
# base64({"role": "nurse"})
4
5
...body
6
7
# in logs
8
{ev: 'w/req', ....., role: 'nurse'}
9
{ev: 'w/resp', ....., role: 'nurse'}
Copied!
Last modified 1yr ago
Copy link