call ds.trackReqHeaders() as needed in app middleware#4312
Merged
xzhou82 merged 2 commits intorelease-2.170from Mar 13, 2026
Merged
call ds.trackReqHeaders() as needed in app middleware#4312xzhou82 merged 2 commits intorelease-2.170from
xzhou82 merged 2 commits intorelease-2.170from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for datasets (notably GDC) to optionally track incoming request headers in app middleware so downstream external-API calls can include required header fields.
Changes:
- Add
trackReqHeaders(req,res)and updategetHostHeaderstyping/docs on the dataset type. - Invoke dataset header tracking alongside abort-controller setup in
server/src/app.middlewares.js. - Add an Unreleased changelog entry noting the fix.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| shared/types/src/dataset.ts | Adds trackReqHeaders to the dataset type and updates docs/typing for external API host/headers helpers. |
| server/src/app.middlewares.js | Hooks optional dataset request-header tracking into middleware and refactors abort-controller helper. |
| CHANGELOG.md | Adds an Unreleased note about calling ds.trackReqHeaders() in middleware. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
101b5be to
3f3454a
Compare
xzhou82
approved these changes
Mar 13, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Call the optional
ds.trackReqHeadersas needed in app.middleware, so that datasets like GDC can add request header fields that are required by their API.Addresses https://gdc-ctds.atlassian.net/browse/FEAT-888 and https://gdc-ctds.atlassian.net/browse/FEAT-889.
Checklist
Check each task that has been performed or verified to be not applicable.