ing
This commit is contained in:
parent
4838bcba97
commit
378bf9183d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user