Skip to content

[Bug] API responses emit weak ETags for dynamic JSON #1268

Description

@M3stark

References #33.

/bounty $50

Summary

The Express API currently uses the default weak ETag behavior for JSON responses. Dynamic operational endpoints such as /health and stubbed API routes can therefore emit validator headers even though their responses should be evaluated fresh by clients and probes.

Impact

Weak ETags on dynamic API responses can encourage conditional requests and 304 Not Modified behavior for endpoints whose data is expected to represent current service state. This is a small API correctness and cache-safety bug, especially for health checks, smoke tests, and frontend API calls that should not depend on stale response validators.

Affected area

  • apps/api/src/index.ts
  • focused API response header validation

Expected behavior

The API should disable Express ETag generation for its dynamic JSON responses so ordinary /health and /users responses do not include an ETag header.

Acceptance criteria

  • Disable Express ETag generation for the API app.
  • Preserve the existing /health and /users JSON response bodies.
  • Include a small validation script or focused test that proves the API disables ETag generation before routes are registered.
  • Keep the change scoped to API ETag behavior plus required AI agent metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions