summaryrefslogtreecommitdiff
path: root/caddytest
diff options
context:
space:
mode:
authorY.Horie <u5.horie@gmail.com>2023-01-28 13:31:37 +0900
committerGitHub <noreply@github.com>2023-01-27 23:31:37 -0500
commitd73660f7c338cf4d12ba82c07e14df7f53593ea5 (patch)
treedfb02b939bb231a2e6f7ae3545a5c235c27316f8 /caddytest
parent7f2a93e6c36ceec9e007baeedeb594ab0dc43a71 (diff)
httpcaddyfile: Add persist_config global option (#5339)
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/global_options_admin_with_persist_config_off.txt36
-rw-r--r--caddytest/integration/caddyfile_adapt/global_options_persist_config.txt25
2 files changed, 61 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/global_options_admin_with_persist_config_off.txt b/caddytest/integration/caddyfile_adapt/global_options_admin_with_persist_config_off.txt
new file mode 100644
index 0000000..998fe22
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/global_options_admin_with_persist_config_off.txt
@@ -0,0 +1,36 @@
+{
+ http_port 8080
+ persist_config off
+ admin {
+ origins localhost:2019 [::1]:2019 127.0.0.1:2019 192.168.10.128
+ }
+}
+
+:80
+----------
+{
+ "admin": {
+ "listen": "localhost:2019",
+ "origins": [
+ "localhost:2019",
+ "[::1]:2019",
+ "127.0.0.1:2019",
+ "192.168.10.128"
+ ],
+ "config": {
+ "persist": false
+ }
+ },
+ "apps": {
+ "http": {
+ "http_port": 8080,
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":80"
+ ]
+ }
+ }
+ }
+ }
+}
diff --git a/caddytest/integration/caddyfile_adapt/global_options_persist_config.txt b/caddytest/integration/caddyfile_adapt/global_options_persist_config.txt
new file mode 100644
index 0000000..c905b47
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/global_options_persist_config.txt
@@ -0,0 +1,25 @@
+{
+ persist_config off
+}
+
+:8881 {
+}
+----------
+{
+ "admin": {
+ "config": {
+ "persist": false
+ }
+ },
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":8881"
+ ]
+ }
+ }
+ }
+ }
+}