storj / edge

Storj edge services (including multi-tenant, S3-compatible server to interact with the Storj network)
GNU Affero General Public License v3.0
48 stars 18 forks source link

Add request and response headers to Linksharing logs #349

Closed halkyon closed 8 months ago

halkyon commented 1 year ago

Goal

Currently we don't log request and response headers for Linksharing, unlike Gateway-MT. That can make debugging a little more difficult. For example, we don't know which range header the client may have sent, which could be helpful for debugging a ranged request.

Acceptance Criteria

I can find request and response headers in the log output for Linksharing requests, and in the same format as Gateway-MT currently logs them.

Any known sensitive headers are redacted and not logged, e.g. for Gateway-MT we replace the Authorization header value with [...].

Notes

Logging middleware for Gateway-MT can be found here: https://github.com/storj/gateway-mt/blob/main/pkg/server/middleware/log.go

storj-gerrit[bot] commented 9 months ago

Change httpserver: log linksharing request/response headers mentions this issue.