summaryrefslogtreecommitdiff
path: root/caddyconfig/httpcaddyfile/httptype.go
diff options
context:
space:
mode:
Diffstat (limited to 'caddyconfig/httpcaddyfile/httptype.go')
-rw-r--r--caddyconfig/httpcaddyfile/httptype.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go
index c6225df..2e7dd7c 100644
--- a/caddyconfig/httpcaddyfile/httptype.go
+++ b/caddyconfig/httpcaddyfile/httptype.go
@@ -430,9 +430,12 @@ func (st *ServerType) serversFromPairings(
jLongestPath = addr.Path
}
}
+ // catch-all blocks (blocks with no hostname) should always go
+ // last, even after blocks with wildcard hosts
+ if specificity(iLongestHost) == 0 {
+ return false
+ }
if specificity(jLongestHost) == 0 {
- // catch-all blocks (blocks with no hostname) should always go
- // last, even after blocks with wildcard hosts
return true
}
if iWildcardHost != jWildcardHost {