diff --git a/fasthttp/fasthttp.go b/fasthttp/fasthttp.go index 31b1aef..0528463 100644 --- a/fasthttp/fasthttp.go +++ b/fasthttp/fasthttp.go @@ -69,7 +69,10 @@ func New(co cors.Options) Cors { break } else if i := strings.IndexByte(origin, '*'); i >= 0 { // Split the origin in two: start and end string without the * - w := internal.Wildcard{origin[0:i], origin[i+1 : len(origin)]} + w := internal.Wildcard{ + Prefix: origin[0:i], + Suffix: origin[i+1 : len(origin)], + } c.allowedWOrigins = append(c.allowedWOrigins, w) } else { c.allowedOrigins = append(c.allowedOrigins, origin)