Skip to content

Commit f44ef93

Browse files
committed
fix
1 parent 5f0cb8f commit f44ef93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/proxy/plugins/corsorigin/cors_origin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ func (m *CorsOrigin) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
128128
return fmt.Errorf("base_domain and allowed_origins subdirectives are mutually exclusive, configure only one of them")
129129
}
130130

131-
if !m.AnyDomain && len(m.AllowedOrigins) == 0 {
132-
return fmt.Errorf("Please configure allowed_origins subdirective")
131+
if !m.AnyDomain && m.BaseDomain == "" && len(m.AllowedOrigins) == 0 {
132+
return fmt.Errorf("Please configure the base_domain or allowed_origins subdirective")
133133
}
134134

135135
return nil

0 commit comments

Comments
 (0)