We are experimenting with private RPC usage in local development, but there is currently no option to provide request headers to websocket connections, such as an auth token that an RPC proxy can use to authenticate requests.
Example of the sort of support envisaged under the hood of WsProvider:
import WebSocket from "ws";
const socket = new WebSocket("wss://api.example.com/socket", {
headers: {
Authorization: `Bearer ${process.env.API_TOKEN}`,
"X-Client-ID": "example-client"
}
});
In local development, where IP addresses change often, an auth token would be more suitable than having to continuously update IP address whitelists.
Thanks!
We are experimenting with private RPC usage in local development, but there is currently no option to provide request headers to websocket connections, such as an auth token that an RPC proxy can use to authenticate requests.
Example of the sort of support envisaged under the hood of
WsProvider:In local development, where IP addresses change often, an auth token would be more suitable than having to continuously update IP address whitelists.
Thanks!