allow for customizing allowed WebSocket origins

https://geth.ethereum.org/docs/rpc/server
https://github.com/ethereum/go-ethereum/issues/16608

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-12-04 17:59:23 +01:00
parent 1c8f6ff804
commit 16eecb5b9e
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 3 additions and 2 deletions

View File

@ -34,10 +34,11 @@ geth_ipc_path: '/data/geth.ipc'
geth_websocket_enabled: true
geth_websocket_port: '{{ geth_rpc_port + 1 | int }}'
geth_websocket_api: 'eth,net,web3,personal,admin'
geth_websocket_origins: 'localhost'
# useful for linking containers
geth_extra_alias: geth
geth_aliases:
- localhost
- 'localhost'
- '{{ geth_extra_alias }}'
- '{{ hostname }}'
- '{{ hostname }}.tinc'

View File

@ -70,8 +70,8 @@
--ws
--ws.addr=0.0.0.0
--ws.port={{ geth_websocket_port }}
--ws.origins={{ geth_aliases | join(",") }}
--ws.api={{ geth_websocket_api }}
--ws.origins='{{ geth_websocket_origins }}'
{% endif %}
volumes:
- '{{ geth_cont_vol }}/keys:/keys:rw'