feat(compute/serve): allow local WebSocket passthrough to be disabled - #1876
Open
harmony7 wants to merge 2 commits into
Open
feat(compute/serve): allow local WebSocket passthrough to be disabled#1876harmony7 wants to merge 2 commits into
harmony7 wants to merge 2 commits into
Conversation
Adds a way to turn off Viceroy's local WebSocket passthrough, for cases where it is not supported or not wanted. Two controls, both defaulting to enabled: - a new `[local_server.websockets_passthrough]` section in fastly.toml, with an `enable` key - a new `--experimental-websockets-passthrough` flag on `compute serve`, which takes precedence over the manifest Viceroy already enables WebSocket passthrough by default, so we only pass `--enable-local-websocket-passthrough=false` when the effective value is false, and pass nothing otherwise. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jedisct1
approved these changes
Aug 8, 2026
Member
Author
|
This feature requires fastly/Viceroy#678 to be shipped first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change summary
Adds a way to disable Viceroy's local WebSocket passthrough from
fastly compute serve, for cases where it isn't supported or isn't wanted.There are two controls, both defaulting to enabled:
[local_server.websockets_passthrough]section infastly.tomlwith anenablekey, mirroring the existing[local_server.pushpin]section--experimental-websockets-passthroughflag oncompute serve, which takes precedence over the manifest (so--no-experimental-websockets-passthroughdisables it, and the flag can also re-enable it over a manifestenable = false)Viceroy already enables WebSocket passthrough by default and that isn't expected to change, so we only pass
--enable-local-websocket-passthrough=falsewhen the effective value isfalse, and pass nothing at all otherwise. That keeps the invocation unchanged for everyone who doesn't opt out.Resolution order in
serve.go:--experimental-websockets-passthrough, if setlocal_server.websockets_passthrough.enable, if settrueAll Submissions:
New Feature Submissions:
Changes to Core Features:
[local_server.websockets_passthrough]was added topkg/manifest/testdata/fastly-viceroy-update.tomlso the existingTestManifestPersistsLocalServerSectionround-trip test covers the new section, and the new flag was added to the ignore list in thecompute build/compute serveflag-parity test.go build ./...,gofmt,go vet, and thepkg/app,pkg/manifest, andpkg/commands/computetest packages all pass locally.User Impact
No change unless a user opts in: with neither the flag nor the manifest section set, the Viceroy command line is byte-for-byte what it was before. Users who need to turn passthrough off now have a supported way to do it.
Are there any considerations that need to be addressed for release?
No breaking changes.
This feature requires fastly/Viceroy#678 to be shipped first. Also worth noting that
--enable-local-websocket-passthroughis only ever passed when a user explicitly disables passthrough, so existing setups can't hit that.