// SetAllowedHeaders sets the AllowedHeaders field's value.
432700
func (s *CorsRule) SetAllowedHeaders(v []*string) *CorsRule {
	s.AllowedHeaders = v
	return s
}
1145133
func (s *TestInvokeMethodInput) SetHeaders(v map[string]*string) *TestInvokeMethodInput {
	s.Headers = v
	return s
}
548681
func (s *ImagePermissions) SetAllowFleet(v bool) *ImagePermissions {
	s.AllowFleet = &v
	return s
}
637035
func (c *Cors) areHeadersAllowed(requestedHeaders []string) bool {
	if c.allowedHeadersAll || len(requestedHeaders) == 0 {
		return true
	}
	for _, header := range requestedHeaders {
		header = http.CanonicalHeaderKey(header)
		found := false
		for _, h := range c.allowedHeaders {
			if h == header {
				found = true
			}
		}
		if !found {
			return false
		}
	}
	return true
}
1118712
func (s *UploadMetadata) SetSignedHeaders(v map[string]*string) *UploadMetadata {
	s.SignedHeaders = v
	return s
}
1260383
func SetAcceptedHeaders(resp *http.Response) {
	SetLocationHeader(resp, TestURL)
	SetRetryHeader(resp, TestDelay)
}
584202
func (s *OptionGroupOptionSetting) SetAllowedValues(v string) *OptionGroupOptionSetting {
	s.AllowedValues = &v
	return s
}
164753
func AllowAll() *Cors {
	return New(Options{
		AllowedOrigins: []string{"*"},
		AllowedMethods: []string{
			http.MethodHead,
			http.MethodGet,
			http.MethodPost,
			http.MethodPut,
			http.MethodPatch,
			http.MethodDelete,
		},
		AllowedHeaders:   []string{"*"},
		AllowCredentials: false,
	})
}
993229
func (s *CorsRule) SetAllowedOrigins(v []*string) *CorsRule {
	s.AllowedOrigins = v
	return s
}
369580
func (api *Client) SetRestricted(teamName, uid string, channelIds ...string) error {
	return api.SetRestrictedContext(context.Background(), teamName, uid, channelIds...)
}
655568
func (s *Server) setAllowedOrigins(rw http.ResponseWriter, ro string) {
	if len(s.allowedOrigins) > 0 {
		if _, ok := s.allowedOrigins[ro]; ok {
			// localhost CORS is not supported by all browsers. It has to use "*".
			if strings.Contains(ro, "127.0.0.1") || strings.Contains(ro, "localhost") {
				ro = "*"
			}
			rw.Header().Set("Access-Control-Allow-Origin", ro)
			rw.Header().Set("Access-Control-Allow-Methods", allowedMethods)
			rw.Header().Set("Access-Control-Allow-Headers", allowedHeaders)
			rw.Header().Set("Access-Control-Max-Age", strconv.Itoa(maxAge))
		}
	}
}
76693
func (l *proxyProtocolListener) checkAllowed(raddr net.Addr) bool {
	if l.allowAll {
		return true
	}
	taddr, ok := raddr.(*net.TCPAddr)
	if !ok {
		return false
	}
	cip := taddr.IP
	for _, ipnet := range l.allowedNets {
		if ipnet.Contains(cip) {
			return true
		}
	}
	return false
}
166813
func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
	s.AllowedOrigins = v
	return s
}
98168
func (h Headers) AddHeaders(o Headers) Headers {
	r := append(h, o...)
	return r
}
844290
func (s *TestInvokeAuthorizerInput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeAuthorizerInput {
	s.MultiValueHeaders = v
	return s
}
298779
func (s *AuthResult) SetAllowed(v *Allowed) *AuthResult {
	s.Allowed = v
	return s
}
142120
func (r Network_Storage_Group_Iscsi) AddAllowedHost(allowedHost *datatypes.Network_Storage_Allowed_Host) (resp bool, err error) {
	params := []interface{}{
		allowedHost,
	}
	err = r.Session.DoRequest("SoftLayer_Network_Storage_Group_Iscsi", "addAllowedHost", params, &r.Options, &resp)
	return
}