From b9b388c8a8b6154a00184ebd9096ba7bce6ff6b7 Mon Sep 17 00:00:00 2001 From: Tom Jack Date: Thu, 17 Oct 2019 15:31:14 -0500 Subject: [PATCH 1/2] Do not expose RPC to the browser --- src/bin_client/test/test_cors.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin_client/test/test_cors.sh b/src/bin_client/test/test_cors.sh index 49c5980040ce..6003d20f53a3 100755 --- a/src/bin_client/test/test_cors.sh +++ b/src/bin_client/test/test_cors.sh @@ -5,7 +5,7 @@ set -e test_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)")" source $test_dir/test_lib.inc.sh "$@" -start_node 1 --cors-origin "*" +start_node 1 --cors-origin localhost show_logs="no" -- GitLab From 94731e7de191f08453353ae3dd74b75b7b47671a Mon Sep 17 00:00:00 2001 From: Tom Jack Date: Wed, 23 Oct 2019 16:02:25 -0500 Subject: [PATCH 2/2] Not in test_cors.py either --- tests_python/tests/test_cors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests_python/tests/test_cors.py b/tests_python/tests/test_cors.py index 428af322da48..c7cbb8f02e20 100644 --- a/tests_python/tests/test_cors.py +++ b/tests_python/tests/test_cors.py @@ -5,7 +5,7 @@ from tools import utils @pytest.fixture(scope="class") def node(sandbox): """Launches one node in sandbox mode (genesis)""" - sandbox.add_node(0, params=['--cors-origin', '*']) + sandbox.add_node(0, params=['--cors-origin', 'localhost']) yield sandbox.node(0) @@ -38,4 +38,4 @@ class TestCors: '/chains/main/blocks/head/header/shell', headers=headers) print(res.headers) - assert res.headers["access-control-allow-origin"] == '*' + assert res.headers["access-control-allow-origin"] == 'localhost' -- GitLab