summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/server.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-06-26 10:57:18 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-06-26 10:57:18 -0600
commita524bcfe78e8067b8224b1794c6842d9c2c7e8cf (patch)
tree42e7ce1c00505eeb98c6a1c88ee24cdf4bd3c5d2 /modules/caddyhttp/server.go
parent91b03dccb0094d96652def8a9c70016fd53d1006 (diff)
Enable skipping just certificate management for some auto HTTPS names
Diffstat (limited to 'modules/caddyhttp/server.go')
-rw-r--r--modules/caddyhttp/server.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go
index be46d6d..05763ba 100644
--- a/modules/caddyhttp/server.go
+++ b/modules/caddyhttp/server.go
@@ -133,12 +133,18 @@ type AutoHTTPSConfig struct {
// in automatic HTTPS (they will not have certificates
// loaded nor redirects applied).
Skip []string `json:"skip,omitempty"`
+
+ // Hosts/domain names listed here will still be enabled
+ // for automatic HTTPS (unless in the Skip list), except
+ // that certificates will not be provisioned and managed
+ // for these names.
+ SkipCerts []string `json:"skip_certificates,omitempty"`
}
-// HostSkipped returns true if name is supposed to be skipped
-// when setting up automatic HTTPS.
-func (ahc AutoHTTPSConfig) HostSkipped(name string) bool {
- for _, n := range ahc.Skip {
+// Skipped returns true if name is in skipSlice, which
+// should be one of the Skip* fields on ahc.
+func (ahc AutoHTTPSConfig) Skipped(name string, skipSlice []string) bool {
+ for _, n := range skipSlice {
if name == n {
return true
}