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.
caddyhttp: Implement
auto_https prefer_wildcard
option (caddyserver…
…#6146) * Allow specifying multiple `auto_https` options * Implement `auto_https prefer_wildcard` option * Adapt tests, add mock DNS module for config testing * Rebase fix
- Loading branch information
1 parent
792f1c7
commit 1672484
Showing
7 changed files
with
449 additions
and
20 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
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
106 changes: 106 additions & 0 deletions
106
caddytest/integration/caddyfile_adapt/auto_https_prefer_wildcard.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,106 @@ | ||
{ | ||
auto_https prefer_wildcard | ||
} | ||
|
||
*.example.com { | ||
tls { | ||
dns mock | ||
} | ||
respond "fallback" | ||
} | ||
|
||
foo.example.com { | ||
respond "foo" | ||
} | ||
---------- | ||
{ | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"srv0": { | ||
"listen": [ | ||
":443" | ||
], | ||
"routes": [ | ||
{ | ||
"match": [ | ||
{ | ||
"host": [ | ||
"foo.example.com" | ||
] | ||
} | ||
], | ||
"handle": [ | ||
{ | ||
"handler": "subroute", | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"body": "foo", | ||
"handler": "static_response" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"terminal": true | ||
}, | ||
{ | ||
"match": [ | ||
{ | ||
"host": [ | ||
"*.example.com" | ||
] | ||
} | ||
], | ||
"handle": [ | ||
{ | ||
"handler": "subroute", | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"body": "fallback", | ||
"handler": "static_response" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"terminal": true | ||
} | ||
], | ||
"automatic_https": { | ||
"prefer_wildcard": true | ||
} | ||
} | ||
} | ||
}, | ||
"tls": { | ||
"automation": { | ||
"policies": [ | ||
{ | ||
"subjects": [ | ||
"*.example.com" | ||
], | ||
"issuers": [ | ||
{ | ||
"challenges": { | ||
"dns": { | ||
"provider": { | ||
"name": "mock" | ||
} | ||
} | ||
}, | ||
"module": "acme" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.