diff --git a/CHANGELOG.md b/CHANGELOG.md index 29da061..f5a8531 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.11.0] - 2026-04-02 + +### Changed +- `X-GDC-TRACE-ID` response header is now preserved in proxy and record modes (previously stripped along with all `X-GDC*` headers) +- In record mode, `X-GDC-TRACE-ID` is only forwarded to the client — it is still excluded from saved mappings to keep recordings clean + ## [0.10.0] - 2026-03-18 ### Changed @@ -119,6 +125,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial release +[0.11.0]: https://github.com/gooddata/gooddata-goodmock/compare/v0.10.0...v0.11.0 [0.10.0]: https://github.com/gooddata/gooddata-goodmock/compare/v0.9.0...v0.10.0 [0.9.0]: https://github.com/gooddata/gooddata-goodmock/compare/v0.8.0...v0.9.0 [0.8.0]: https://github.com/gooddata/gooddata-goodmock/compare/v0.7.0...v0.8.0 diff --git a/VERSION b/VERSION index 78bc1ab..d9df1bb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.10.0 +0.11.0 diff --git a/internal/pureproxy/pureproxy.go b/internal/pureproxy/pureproxy.go index 2642124..522984d 100644 --- a/internal/pureproxy/pureproxy.go +++ b/internal/pureproxy/pureproxy.go @@ -66,7 +66,10 @@ func forwardAndRespond(ps *ProxyServer, ctx *fasthttp.RequestCtx) { // Send response back to client, filtering headers for key, values := range respHeaders { upperKey := strings.ToUpper(key) - if strings.HasPrefix(upperKey, "X-GDC") || upperKey == "DATE" { + if upperKey == "DATE" { + continue + } + if strings.HasPrefix(upperKey, "X-GDC") && upperKey != "X-GDC-TRACE-ID" { continue } if upperKey == "CONTENT-ENCODING" { diff --git a/internal/record/record.go b/internal/record/record.go index 352f199..c674570 100644 --- a/internal/record/record.go +++ b/internal/record/record.go @@ -117,7 +117,10 @@ func proxyAndRecord(rs *RecordServer, ctx *fasthttp.RequestCtx) { // Send response back to client, filtering headers for key, values := range respHeaders { upperKey := strings.ToUpper(key) - if strings.HasPrefix(upperKey, "X-GDC") || upperKey == "DATE" { + if upperKey == "DATE" { + continue + } + if strings.HasPrefix(upperKey, "X-GDC") && upperKey != "X-GDC-TRACE-ID" { continue } // Skip Content-Encoding since we decompressed