etherspot / etherspot/relayx

Security / ops: http_cors is configurable but not applied to the JSON-RPC HTTP server

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
bug rust
Dominant language
Rust
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Summary

`Config` exposes `http_cors` / `get_http_cors()` and the README documents CORS behavior, but `ServerBuilder::new(io).threads(4).start_http(...)` in `src/rpc.rs` does not attach any CORS middleware or headers.

## Impact

- Operators may **falsely believe** browser CORS is restricted when it is not (or the opposite, depending on default library behavior).
- Browser-based dApps may see inconsistent behavior vs. documentation.

## Suggested fix

Either wire CORS into the HTTP stack used by `jsonrpc-http-server` (if supported), document that CORS must be handled at the reverse proxy, or remove unused config to avoid confusion.

## References

- `src/rpc.rs` (`ServerBuilder`)
- `src/config.rs` (`get_http_cors`)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.