From 378bf9183d8e73e83f41977035bbe8a3c41e6e13 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 11 Apr 2018 21:14:23 +0900 Subject: [PATCH] ing --- fasthttp/fasthttp.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)