Skip to content

Conversation

@ao-anam
Copy link
Contributor

@ao-anam ao-anam commented Oct 16, 2025

Summary by cubic

Adds an optional proxy config to route REST and WebSocket signalling through a custom proxy, with validation and forwarding metadata.

  • New Features
    • Proxy routing via new api.proxy (ProxyConfig) for API, engine REST, and WebSocket signalling; WebRTC media stays direct.
    • Validation: api/engine accept absolute URLs or paths starting with /; websocket must be ws:// or wss://.
    • Forwarding metadata: REST sends X-Forwarded-Host, X-Forwarded-Proto, X-Original-URI, X-Anam-Target-Url; WS adds x_forwarded_* and x_original_uri query params.
    • Clients updated to honor proxy: CoreApiRestClient, EngineApiRestClient, SignallingClient; validated and passed from AnamClient.

Copilot AI review requested due to automatic review settings October 16, 2025 14:50
@ao-anam ao-anam force-pushed the feat/websocket-proxy branch from d9cb375 to 7cff06c Compare October 16, 2025 14:52

This comment was marked as duplicate.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 13 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="src/modules/EngineApiRestClient.ts">

<violation number="1" location="src/modules/EngineApiRestClient.ts:25">
The proxy request logic is duplicated between `EngineApiRestClient` and `CoreApiRestClient`. This violates the DRY principle and should be extracted into a single, shared utility function to prevent inconsistencies and improve maintainability.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

Smidge
Smidge previously approved these changes Oct 16, 2025
@ao-anam ao-anam changed the title feat: add proxy config option for http and ws requests feat: add gateway config option for http and ws requests Oct 27, 2025
@ao-anam ao-anam merged commit 658e68c into main Oct 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants