code: func (c *Cors) isOriginAllowed(r *http.Request, origin string) bool {
  	if c.allowOriginFunc != nil {
  		return c.allowOriginFunc(r, origin)
  	}
  	if c.allowedOriginsAll {
  		return true
  	}
  	origin = strings.ToLower(origin)
  	for _, o := range c.allowedOrigins {
  		if o == origin {
  			return true
  		}
  	}
  	for _, w := range c.allowedWOrigins {
  		if w.match(origin) {
  			return true
  		}
  	}
  	return false
  }
docs: // isOriginAllowed checks if a given origin is allowed to perform cross-domain requests
  // on the endpoint