diff --git a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcConfiguration.java b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcConfiguration.java index a9daba20ce..d2eb46fe00 100644 --- a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcConfiguration.java +++ b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcConfiguration.java @@ -13,6 +13,7 @@ package tech.pegasys.pantheon.ethereum.jsonrpc; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -29,7 +30,7 @@ public class JsonRpcConfiguration { private String host; private Collection corsAllowedDomains = Collections.emptyList(); private Collection rpcApis; - private Collection hostsWhitelist = Collections.singletonList("localhost"); + private Collection hostsWhitelist = Arrays.asList("localhost", "127.0.0.1");; private boolean authenticationEnabled = false; private String authenticationCredentialsFile; diff --git a/metrics/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java b/metrics/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java index d7d2c3a4e1..f16dee479e 100644 --- a/metrics/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java +++ b/metrics/src/main/java/tech/pegasys/pantheon/metrics/prometheus/MetricsConfiguration.java @@ -14,6 +14,7 @@ package tech.pegasys.pantheon.metrics.prometheus; import tech.pegasys.pantheon.metrics.MetricCategory; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.EnumSet; @@ -38,7 +39,7 @@ public class MetricsConfiguration { private String pushHost; private int pushInterval; private String prometheusJob; - private Collection hostsWhitelist = Collections.singletonList("localhost"); + private Collection hostsWhitelist = Arrays.asList("localhost", "127.0.0.1"); public static MetricsConfiguration createDefault() { final MetricsConfiguration metricsConfiguration = new MetricsConfiguration(); diff --git a/pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java b/pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java index ae0fc9e5f6..98f0ebeeec 100644 --- a/pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java +++ b/pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java @@ -404,7 +404,7 @@ public class PantheonCommand implements DefaultCommandValues, Runnable { paramLabel = "[,...]... or * or all", description = "Comma separated list of hostnames to whitelist for JSON-RPC access, or * or all to accept any host (default: ${DEFAULT-VALUE})", - defaultValue = "localhost") + defaultValue = "localhost,127.0.0.1") private final JsonRPCWhitelistHostsProperty hostsWhitelist = new JsonRPCWhitelistHostsProperty(); @Option(