-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip comparing wildcards against eachother when consolidating APs
- Loading branch information
1 parent
2864a6f
commit 8ecfe37
Showing
2 changed files
with
148 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
142 changes: 142 additions & 0 deletions
142
caddytest/integration/caddyfile_adapt/auto_https_prefer_wildcard_multi.caddyfiletest
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,142 @@ | ||
{ | ||
auto_https prefer_wildcard | ||
} | ||
|
||
*.one.example.com { | ||
tls { | ||
dns mock | ||
} | ||
respond "one fallback" | ||
} | ||
|
||
*.two.example.com { | ||
tls { | ||
dns mock | ||
} | ||
respond "two fallback" | ||
} | ||
|
||
foo.one.example.com { | ||
respond "foo" | ||
} | ||
---------- | ||
{ | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"srv0": { | ||
"listen": [ | ||
":443" | ||
], | ||
"routes": [ | ||
{ | ||
"match": [ | ||
{ | ||
"host": [ | ||
"foo.one.example.com" | ||
] | ||
} | ||
], | ||
"handle": [ | ||
{ | ||
"handler": "subroute", | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"body": "foo", | ||
"handler": "static_response" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"terminal": true | ||
}, | ||
{ | ||
"match": [ | ||
{ | ||
"host": [ | ||
"*.one.example.com" | ||
] | ||
} | ||
], | ||
"handle": [ | ||
{ | ||
"handler": "subroute", | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"body": "one fallback", | ||
"handler": "static_response" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"terminal": true | ||
}, | ||
{ | ||
"match": [ | ||
{ | ||
"host": [ | ||
"*.two.example.com" | ||
] | ||
} | ||
], | ||
"handle": [ | ||
{ | ||
"handler": "subroute", | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"body": "two fallback", | ||
"handler": "static_response" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"terminal": true | ||
} | ||
], | ||
"automatic_https": { | ||
"skip": [ | ||
"foo.one.example.com" | ||
], | ||
"prefer_wildcard": true | ||
} | ||
} | ||
} | ||
}, | ||
"tls": { | ||
"automation": { | ||
"policies": [ | ||
{ | ||
"subjects": [ | ||
"*.one.example.com", | ||
"*.two.example.com" | ||
], | ||
"issuers": [ | ||
{ | ||
"challenges": { | ||
"dns": { | ||
"provider": { | ||
"name": "mock" | ||
} | ||
} | ||
}, | ||
"module": "acme" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |