Rootstock: override RSKJ_SYS_PROPS to allow Host: * in http whitelist

The rsksmart/rskj:VETIVER-9.0.1 image bakes an env var:
  RSKJ_SYS_PROPS=-Drpc.providers.web.http.bind_address=0.0.0.0
                 -Drpc.providers.web.http.hosts.0=localhost
                 -Drpc.providers.web.http.hosts.1=127.0.0.1
                 -Drpc.providers.web.http.hosts.2=::1

These JVM -D system properties take precedence over /etc/rsk/node.conf
in HOCON, so the Host whitelist always resolves to {localhost,127.0.0.1,::1}.

Result: traefik routing to rskj at IP rootstock-mainnet-client:8545
arrives with Host header that doesn't match those three. rskj returns
HTTP 400, traefik translates to 502 Bad Gateway.

Override the env var in the compose template so the http hosts whitelist
contains '*' (any host). Traefik's ipallowlist middleware is the actual
gatekeeper. Affects rootstock-mainnet AND rootstock-bamboo.
This commit is contained in:
2026-05-05 19:06:31 +00:00
parent abb3c4b189
commit 53697cb40d
2 changed files with 4 additions and 0 deletions

View File

@@ -51,6 +51,8 @@ services:
expose:
- 8545
- 8546
environment:
RSKJ_SYS_PROPS: -Drpc.providers.web.http.bind_address=0.0.0.0 -Drpc.providers.web.http.hosts.0=*
restart: unless-stopped
stop_grace_period: 5m
networks: