summaryrefslogtreecommitdiffhomepage
path: root/caddytest
diff options
context:
space:
mode:
authorFrancis Lavoie <[email protected]>2023-10-14 16:23:50 -0400
committerGitHub <[email protected]>2023-10-14 14:23:50 -0600
commit7984e6f6fd235b033adb933b2030b9ba9bc66eeb (patch)
tree14c8d6ae0301aa44c88277a13fc6a20f29430c41 /caddytest
parentd70608b65612ccf1e61ef4d7e4686ec2d6d9891f (diff)
downloadcaddy-7984e6f6fd235b033adb933b2030b9ba9bc66eeb.tar.gz
caddy-7984e6f6fd235b033adb933b2030b9ba9bc66eeb.zip
httpcaddyfile: Fix TLS automation policy merging with get_certificate (#5896)
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/tls_automation_policies_11.txt67
1 files changed, 67 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/tls_automation_policies_11.txt b/caddytest/integration/caddyfile_adapt/tls_automation_policies_11.txt
new file mode 100644
index 000000000..9cdfd1200
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/tls_automation_policies_11.txt
@@ -0,0 +1,67 @@
+# example from https://caddy.community/t/21415
+a.com {
+ tls {
+ get_certificate http http://foo.com/get
+ }
+}
+
+b.com {
+}
+----------
+{
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":443"
+ ],
+ "routes": [
+ {
+ "match": [
+ {
+ "host": [
+ "a.com"
+ ]
+ }
+ ],
+ "terminal": true
+ },
+ {
+ "match": [
+ {
+ "host": [
+ "b.com"
+ ]
+ }
+ ],
+ "terminal": true
+ }
+ ]
+ }
+ }
+ },
+ "tls": {
+ "automation": {
+ "policies": [
+ {
+ "subjects": [
+ "a.com"
+ ],
+ "get_certificate": [
+ {
+ "url": "http://foo.com/get",
+ "via": "http"
+ }
+ ]
+ },
+ {
+ "subjects": [
+ "b.com"
+ ]
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file