Skip to content

add websocket headers and proxy path support#1682

Open
ktarplee wants to merge 1 commit into
nats-io:mainfrom
ktarplee:feat-websocket
Open

add websocket headers and proxy path support#1682
ktarplee wants to merge 1 commit into
nats-io:mainfrom
ktarplee:feat-websocket

Conversation

@ktarplee

@ktarplee ktarplee commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

This PR adds CLI flags for websocket headers and proxy path.

Some thoughts:

  1. While the NATS API separates the proxy path from the server name, is that what we would want in the API? I think it would be cleaner to support a server URL and then extract the URL path from that and use it as the proxy path. -s wss://example.com/path/to/websocket as opposed to -s wss://example.com --proxy-path /path/to/websocket.
  2. The NATS context config file should probably support setting the websocket headers and proxy path but that object seems to be defined in a the jsm.js project for some reason. It is not obvious to me why the config file for the NATS cli is in the jsm.go project.
  3. I still need to fix the rtt command. It does some stuff differently that does not seem to work with websockets.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3367d7591

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread cli/util.go Outdated
@ripienaar

Copy link
Copy Markdown
Collaborator

We have other inflight PRs around this here nats-io/jsm.go#813 and here #1672 (comment) and nats-io/nats.go#2092

I have no idea what the correct approach is but seems there are some contradictory approaches here

Signed-off-by: Kyle M. Tarplee <kmtarplee@ieee.org>
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.

2 participants