Skip to content

Commit

Permalink
Fix forbidWs option being ignored (#1790)
Browse files Browse the repository at this point in the history
* Fix `forbidWs` option being ignored

* PR link
  • Loading branch information
tomaka committed Apr 26, 2024
1 parent f9908ce commit 5579a78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions wasm-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- All `transactionWatch_unstable`-prefixed JSON-RPC functions have been renamed to `transactionWatch_v1`, in accordance with the latest changes in the JSON-RPC API specification. ([#1771](https://github.com/smol-dot/smoldot/pull/1771))

### Fixed

- Fix the `forbidWs` option being ignored when connecting to non-localhost addresses. Smoldot erroneously only took the value of `forbidNonLocalWs` in that situation. Connecting to a non-localhost address is now only done if both `forbidWs` and `forbidNonLocalWs` are `false`. ([#1790](https://github.com/smol-dot/smoldot/pull/1790))

## 2.0.24 - 2024-04-16

### Changed
Expand Down
2 changes: 1 addition & 1 deletion wasm-node/javascript/src/internals/local-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export async function startLocalInstance(config: Config, wasmModule: WebAssembly
case 4:
case 5:
case 6: {
return config.forbidNonLocalWs ? 0 : 1
return (config.forbidWs || config.forbidNonLocalWs) ? 0 : 1
}
case 7: {
return config.forbidWs ? 0 : 1
Expand Down

0 comments on commit 5579a78

Please sign in to comment.