From 16eecb5b9eccae49c0f3bdc314095493aed6b968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 4 Dec 2020 17:59:23 +0100 Subject: [PATCH] allow for customizing allowed WebSocket origins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://geth.ethereum.org/docs/rpc/server https://github.com/ethereum/go-ethereum/issues/16608 Signed-off-by: Jakub SokoĊ‚owski --- defaults/main.yml | 3 ++- tasks/container.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 772a0a5..bc91eea 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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' diff --git a/tasks/container.yml b/tasks/container.yml index 2cca1b7..c07cd55 100644 --- a/tasks/container.yml +++ b/tasks/container.yml @@ -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'