forked from caddyserver/caddy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
httpcaddyfile: Add persist_config global option.
* Fixes caddyserver#5209 * `persist_config off` disables configuration persist explictly in Caddyfile * if it sets, Admin.Config.Persist becomes false
- Loading branch information
Showing
4 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
caddytest/integration/caddyfile_adapt/global_options_admin_with_persist_config_off.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
caddytest/integration/caddyfile_adapt/global_options_persist_config.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
persist_config off | ||
} | ||
|
||
:8881 { | ||
} | ||
---------- | ||
{ | ||
"admin": { | ||
"config": { | ||
"persist": false | ||
} | ||
}, | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"srv0": { | ||
"listen": [ | ||
":8881" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |