solution: support basic auth for websockets

This commit is contained in:
Igor Artamonov
2019-08-15 23:38:12 -04:00
parent 38afb2a1a4
commit 8d83935672
9 changed files with 95 additions and 38 deletions

View File

@@ -31,6 +31,11 @@ class UpstreamsConfigReaderSpec extends Specification {
rpc.url == new URI("http://localhost:8545")
ws != null
ws.url == new URI("ws://localhost:8546")
ws.basicAuth != null
with(ws.basicAuth) {
username == "9c199ad8f281f20154fc258fe41a6814"
password == "258fe4149c199ad8f2811a68f20154fc"
}
}
}
with(act.upstreams.get(1)) {

View File

@@ -16,6 +16,9 @@ upstreams:
ws:
url: "ws://localhost:8546"
origin: "http://localhost"
basic-auth:
username: 9c199ad8f281f20154fc258fe41a6814
password: 258fe4149c199ad8f2811a68f20154fc
- id: infura
chain: ethereum
connection: