Ensure every response carries consistent, documented headers that clients and tools can rely on
@ranjeet150 is already working on this.
Since Oct 9, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- nodejs, typescript
- Domain
- api, documentation
Research direction
Start in src/config/cors.config.ts, where exposedHeaders lists only X-Total-Count and allowedHeaders lacks any request-id header. The issue first asks for a header contract to be decided and written in docs/, and it depends on the request-id and rate-limit issues, so confirm those decisions before editing. Done means the contract is documented, the headers appear in docs/openapi.json via @ApiHeader, and a CORS test shows a browser client can read the correlation and rate-limit headers.
Written by the indexing model from the issue text.
Description
Problem
Clients — SDKs, dashboards, monitoring agents, and the operator UIs the README describes — can only act on information they can reliably find in responses. Several such headers are missing, inconsistent, or undocumented:
src/config/cors.config.tsexposes only one:exposedHeaders: ["X-Total-Count"]. SoX-RateLimit-*andRetry-Afterare not exposed to browser clients even if the server sets them — meaning a dashboard in a browser cannot implement throttling.allowedHeadersis["Content-Type", "Authorization", "X-Requested-With"], so a client cannot even send anX-Request-Idfor correlation.- There is no
X-Request-Idon responses at all, so a user reporting a problem cannot quote an id that maps to server logs. x-powered-byis disabled (good), but the CORSX-Requested-Withallowance is not obviously serving a purpose.
Why it matters
This is the API equivalent of a page with no labels: the information exists on the server, but the client has no documented, reliable way to reach it. For the operator dashboard in particular — the README's "Real-time agent dashboard" is a first-class feature — throttling and correlation headers being unreachable from the browser means the dashboard cannot show useful diagnostics.
Suggested Direction
- Decide the header contract and document it. Reasonable set:
X-Request-Id, theX-RateLimit-*family,Retry-After,X-Total-Count, andDeprecation/Sunsetif the deprecation issue lands. - Expose them all in
cors.config.tsexposedHeadersso browser clients can read them. - Allow correlation headers in
allowedHeadersso a client can propagate its own id — validate the format before echoing it, as the request-id issue specifies. - Add
X-Request-Idto every response (interceptor or middleware). - Document them in
docs/and mark them with@ApiHeaderdecorators so they appear in the OpenAPI spec and generated SDKs. - Consider removing
X-Requested-WithfromallowedHeadersif nothing uses it — every unnecessary allowed header is extra surface.
Constraints
- Do not expose internal headers that leak configuration. Headers are readable by any browser client once exposed.
- Header names and values must not contain user input unsanitised, particularly
X-Request-Id. - Changing
allowedHeaders/exposedHeadersis a client-visible change — note it inCHANGELOG.md. - Coordinate with the rate-limit-headers issue so the contract is defined once.
Acceptance Criteria
- A documented header contract exists in
docs/. - All contract headers are listed in
exposedHeaders. -
X-Request-Idis returned on every response and accepted on inbound requests when valid. - Rate-limit headers are readable by browser clients.
- Headers are marked with
@ApiHeaderand appear indocs/openapi.json. - A test asserts a browser client can read the correlation and rate-limit headers under CORS.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 55
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 5
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SourceXXL/alian_structure-api
-
good first issue help wanted security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SourceXXL/alian_structure-api#266 ·
-
Parallelize the cache-warming loop in `cache-warming.service.ts` — warmers run strictly sequentiallyPossibly taken @syntaxsuuvam-spec claimed this 4 days ago. Opengood first issue performance
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SourceXXL/alian_structure-api#240 ·
-
documentation help wanted intermediate refactor
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
SourceXXL/alian_structure-api#215 ·
-
good first issue refactor tooling
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
SourceXXL/alian_structure-api#199 ·
-
help wanted intermediate refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SourceXXL/alian_structure-api#196 ·
All issues in SourceXXL/alian_structure-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-dev-skill#151 ·
Maintainers usually reply within 1 day
-
area:arcade game ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fderuiter/deruiter.dev#2281 · 1 comment ·
Maintainers usually reply within 1 day
-
scope: data grid type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
vicharanashala/ajrasakha#1439 ·
Maintainers usually reply within 1 day
-
Add: TV5Monde AsieOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day