code: func Cors(allowedOrigins ...string) http.HandlerFunc {
  	if len(allowedOrigins) == 0 {
  		allowedOrigins = append(allowedOrigins, "*")
  	}
  	return func(rw http.ResponseWriter, req *http.Request) {
  		allowed := false
  		// Set appropriate response headers required for CORS
  		reqOrigin := req.Header.Get(headerGetOrigin)
  		for _, o := range allowedOrigins {
  			// Set appropriate response headers required for CORS
  			if o == "*" || o == reqOrigin {
  				rw.Header().Set(headerOrigin, reqOrigin)
  				allowed = true
  				break
  			}
  		}
  
  		if !allowed {
  			webgo.SendHeader(rw, http.StatusForbidden)
  			return
  		}
  
  		rw.Header().Set(headerMethods, allowMethods)
  		rw.Header().Set(headerCreds, "true")
  
  		// Adding allowed headers
  		rw.Header().Set(headerAllowHeaders, allowHeaders+req.Header.Get(headerReqHeaders))
  	}
  }
docs: // Cors is a basic CORS middleware which can be added to individual handlers