aboutsummaryrefslogtreecommitdiffstats
path: root/tests/files
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-03-29 19:32:54 -0700
committerBryan Newbold <bnewbold@archive.org>2021-03-29 19:33:19 -0700
commitb0f259eff213214d08346cfb4789439d526a9790 (patch)
treeefc3ff454b063f69e7e6e77a9a6e609fa15579e3 /tests/files
parent3212ce9a263083377fb40778e8f49a86ffea2047 (diff)
downloades-public-proxy-b0f259eff213214d08346cfb4789439d526a9790.tar.gz
es-public-proxy-b0f259eff213214d08346cfb4789439d526a9790.zip
in safe-mode, allow index API methods without trailing slash
If we allowed this in `unsafe_all_indices`, then all top-level API methods would be available, which we don't want.
Diffstat (limited to 'tests/files')
-rw-r--r--tests/files/other_fail/GET_mapping_noslash.txt1
-rw-r--r--tests/files/other_fail/HEAD_index_exists.txt1
-rw-r--r--tests/files/other_safe/GET_mapping_noslash.txt1
-rw-r--r--tests/files/other_safe/HEAD_index_exists.txt1
-rw-r--r--tests/files/safe_config.toml8
5 files changed, 12 insertions, 0 deletions
diff --git a/tests/files/other_fail/GET_mapping_noslash.txt b/tests/files/other_fail/GET_mapping_noslash.txt
new file mode 100644
index 0000000..30ff58c
--- /dev/null
+++ b/tests/files/other_fail/GET_mapping_noslash.txt
@@ -0,0 +1 @@
+GET /some-index
diff --git a/tests/files/other_fail/HEAD_index_exists.txt b/tests/files/other_fail/HEAD_index_exists.txt
new file mode 100644
index 0000000..47ab60e
--- /dev/null
+++ b/tests/files/other_fail/HEAD_index_exists.txt
@@ -0,0 +1 @@
+HEAD /some-index
diff --git a/tests/files/other_safe/GET_mapping_noslash.txt b/tests/files/other_safe/GET_mapping_noslash.txt
new file mode 100644
index 0000000..30ff58c
--- /dev/null
+++ b/tests/files/other_safe/GET_mapping_noslash.txt
@@ -0,0 +1 @@
+GET /some-index
diff --git a/tests/files/other_safe/HEAD_index_exists.txt b/tests/files/other_safe/HEAD_index_exists.txt
new file mode 100644
index 0000000..47ab60e
--- /dev/null
+++ b/tests/files/other_safe/HEAD_index_exists.txt
@@ -0,0 +1 @@
+HEAD /some-index
diff --git a/tests/files/safe_config.toml b/tests/files/safe_config.toml
new file mode 100644
index 0000000..3df6acd
--- /dev/null
+++ b/tests/files/safe_config.toml
@@ -0,0 +1,8 @@
+
+bind_addr = "127.0.0.1:9292"
+upstream_addr = "127.0.0.1:9200"
+unsafe_all_indices = false
+enable_cors = true
+
+[[index]]
+name = "some-index"