aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddytest
diff options
context:
space:
mode:
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/tls_automation_wildcard_force_automate.caddyfiletest180
-rw-r--r--caddytest/integration/caddyfile_adapt/tls_automation_wildcard_shadowing.caddyfiletest102
2 files changed, 282 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/tls_automation_wildcard_force_automate.caddyfiletest b/caddytest/integration/caddyfile_adapt/tls_automation_wildcard_force_automate.caddyfiletest
new file mode 100644
index 000000000..4eb6c4f1c
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/tls_automation_wildcard_force_automate.caddyfiletest
@@ -0,0 +1,180 @@
+automated1.example.com {
+ tls force_automate
+ respond "Automated!"
+}
+
+automated2.example.com {
+ tls force_automate
+ respond "Automated!"
+}
+
+shadowed.example.com {
+ respond "Shadowed!"
+}
+
+*.example.com {
+ tls cert.pem key.pem
+ respond "Wildcard!"
+}
+----------
+{
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":443"
+ ],
+ "routes": [
+ {
+ "match": [
+ {
+ "host": [
+ "automated1.example.com"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "subroute",
+ "routes": [
+ {
+ "handle": [
+ {
+ "body": "Automated!",
+ "handler": "static_response"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "terminal": true
+ },
+ {
+ "match": [
+ {
+ "host": [
+ "automated2.example.com"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "subroute",
+ "routes": [
+ {
+ "handle": [
+ {
+ "body": "Automated!",
+ "handler": "static_response"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "terminal": true
+ },
+ {
+ "match": [
+ {
+ "host": [
+ "shadowed.example.com"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "subroute",
+ "routes": [
+ {
+ "handle": [
+ {
+ "body": "Shadowed!",
+ "handler": "static_response"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "terminal": true
+ },
+ {
+ "match": [
+ {
+ "host": [
+ "*.example.com"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "subroute",
+ "routes": [
+ {
+ "handle": [
+ {
+ "body": "Wildcard!",
+ "handler": "static_response"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "terminal": true
+ }
+ ],
+ "tls_connection_policies": [
+ {
+ "match": {
+ "sni": [
+ "automated1.example.com"
+ ]
+ }
+ },
+ {
+ "match": {
+ "sni": [
+ "automated2.example.com"
+ ]
+ }
+ },
+ {
+ "match": {
+ "sni": [
+ "*.example.com"
+ ]
+ },
+ "certificate_selection": {
+ "any_tag": [
+ "cert0"
+ ]
+ }
+ },
+ {}
+ ]
+ }
+ }
+ },
+ "tls": {
+ "certificates": {
+ "automate": [
+ "automated1.example.com",
+ "automated2.example.com"
+ ],
+ "load_files": [
+ {
+ "certificate": "cert.pem",
+ "key": "key.pem",
+ "tags": [
+ "cert0"
+ ]
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/caddytest/integration/caddyfile_adapt/tls_automation_wildcard_shadowing.caddyfiletest b/caddytest/integration/caddyfile_adapt/tls_automation_wildcard_shadowing.caddyfiletest
new file mode 100644
index 000000000..2be543779
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/tls_automation_wildcard_shadowing.caddyfiletest
@@ -0,0 +1,102 @@
+subdomain.example.com {
+ respond "Subdomain!"
+}
+
+*.example.com {
+ tls cert.pem key.pem
+ respond "Wildcard!"
+}
+----------
+{
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":443"
+ ],
+ "routes": [
+ {
+ "match": [
+ {
+ "host": [
+ "subdomain.example.com"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "subroute",
+ "routes": [
+ {
+ "handle": [
+ {
+ "body": "Subdomain!",
+ "handler": "static_response"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "terminal": true
+ },
+ {
+ "match": [
+ {
+ "host": [
+ "*.example.com"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "subroute",
+ "routes": [
+ {
+ "handle": [
+ {
+ "body": "Wildcard!",
+ "handler": "static_response"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "terminal": true
+ }
+ ],
+ "tls_connection_policies": [
+ {
+ "match": {
+ "sni": [
+ "*.example.com"
+ ]
+ },
+ "certificate_selection": {
+ "any_tag": [
+ "cert0"
+ ]
+ }
+ },
+ {}
+ ]
+ }
+ }
+ },
+ "tls": {
+ "certificates": {
+ "load_files": [
+ {
+ "certificate": "cert.pem",
+ "key": "key.pem",
+ "tags": [
+ "cert0"
+ ]
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file