diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-24 01:32:31 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-24 01:32:31 -0600 |
| commit | 3044fd1170a003380a558918605d32491f9b45a5 (patch) | |
| tree | 7577508e8d90d4421ebbb74aceb9ec9768205e77 /pkg/authz | |
| parent | 697c91543430592c1edfe95fbbf327ee1923bc54 (diff) | |
chore: log x-request-id in sparkle and authzd
Diffstat (limited to 'pkg/authz')
| -rw-r--r-- | pkg/authz/check_service.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pkg/authz/check_service.go b/pkg/authz/check_service.go index bb2e960..55d075f 100644 --- a/pkg/authz/check_service.go +++ b/pkg/authz/check_service.go @@ -142,12 +142,13 @@ func (svc *CheckService) Denied(ctx context.Context) *auth.CheckResponse { func (svc *CheckService) fieldsFor(r *auth.CheckRequest) log.Fields { return log.Fields{ - "id": r.Attributes.Request.Http.Id, - "method": r.Attributes.Request.Http.Method, - "path": r.Attributes.Request.Http.Path, - "host": r.Attributes.Request.Http.Host, - "scheme": r.Attributes.Request.Http.Scheme, - "protocol": r.Attributes.Request.Http.Protocol, + "host": r.Attributes.Request.Http.Host, + "id": r.Attributes.Request.Http.Id, + "method": r.Attributes.Request.Http.Method, + "path": r.Attributes.Request.Http.Path, + "protocol": r.Attributes.Request.Http.Protocol, + "request_id": r.Attributes.Request.Http.Headers["x-request-id"], + "scheme": r.Attributes.Request.Http.Scheme, } } |
