Skip to content

expose Location, X-Request-Id, Idempotency-Key via CORS - #3707

Closed
aydnOktay wants to merge 6 commits into
NousResearch:mainfrom
aydnOktay:feat/cors-expose-headers
Closed

expose Location, X-Request-Id, Idempotency-Key via CORS#3707
aydnOktay wants to merge 6 commits into
NousResearch:mainfrom
aydnOktay:feat/cors-expose-headers

Conversation

@aydnOktay

Copy link
Copy Markdown
Contributor

Enhances browser compatibility by adding Access-Control-Expose-Headers to CORS responses so front-end clients can read common response headers. We expose Location, X-Request-Id, and Idempotency-Key, which are frequently needed for navigation, tracing, and request deduplication. The change is minimal, low risk, and includes a unit test that verifies the exposed headers are present on a simple CORS GET response

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery labels May 2, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the browser-CORS improvement. The premise remains valid on current main: _CORS_HEADERS at gateway/platforms/api_server.py:546-549 lacks Access-Control-Expose-Headers, and cors_middleware applies that set to allowed-origin responses at gateway/platforms/api_server.py:554-572. The proposed CORS addition therefore targets the live response path.

Problems

  • The PR also changes agent/skill_commands.py:104-149 and agent/skill_commands.py:292-308, which is unrelated to the stated API-server CORS scope. GitHub currently reports the aggregate branch as conflicting. The linked salvage PR #62759 specifically preserves the API-server change while omitting these drive-by skill-command edits.

Suggested changes

  • Retain the focused API-server header and test only; handle the skill-command work separately.

Automated hermes-sweeper review.

Comment thread agent/skill_commands.py
@@ -104,7 +104,7 @@ def _build_skill_message(
f"[Skill setup note: {loaded_skill['gateway_setup_hint']}]",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This skill-message behavior is unrelated to the PR's stated API-server CORS change. Please keep the CORS salvage focused on gateway/platforms/api_server.py and its test; the mixed scope is what leaves this aggregate branch conflicting.

@teknium1 teknium1 added sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 12, 2026
Bartok9 pushed a commit to Bartok9/hermes-agent that referenced this pull request Aug 1, 2026
@aydnOktay

Copy link
Copy Markdown
Contributor Author

Closing to concentrate review on a single linked product bug: #89979.

@aydnOktay aydnOktay closed this Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants