ing
This commit is contained in:
parent
4838bcba97
commit
378bf9183d
|
@ -69,7 +69,10 @@ func New(co cors.Options) Cors {
|
||||||
break
|
break
|
||||||
} else if i := strings.IndexByte(origin, '*'); i >= 0 {
|
} else if i := strings.IndexByte(origin, '*'); i >= 0 {
|
||||||
// Split the origin in two: start and end string without the *
|
// 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)
|
c.allowedWOrigins = append(c.allowedWOrigins, w)
|
||||||
} else {
|
} else {
|
||||||
c.allowedOrigins = append(c.allowedOrigins, origin)
|
c.allowedOrigins = append(c.allowedOrigins, origin)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user