MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / IsEmpty

Method IsEmpty

auth/cors.go:36–39  ·  view source on GitHub ↗

IsEmpty returns true if the CORS configuration is empty - used instead of a nil check since we always initialize the CORS config struct.

()

Source from the content-addressed store, hash-verified

34
35// IsEmpty returns true if the CORS configuration is empty - used instead of a nil check since we always initialize the CORS config struct.
36func (cors *CORSConfig) IsEmpty() bool {
37 return cors == nil ||
38 (len(cors.Origin) == 0 && len(cors.LoginOrigin) == 0 && len(cors.Headers) == 0 && cors.MaxAge == 0)
39}
40
41func MatchedOrigin(allowOrigins []string, rqOrigins []string) string {
42 for _, rv := range rqOrigins {

Callers 13

GetDocVersionMethod · 0.45
UpdateDocMethod · 0.45
DeleteDocMethod · 0.45
WaitForVersionMethod · 0.45
WaitForTombstoneMethod · 0.45
checkLoginCORSMethod · 0.45
GetVersionMethod · 0.45
WaitForPullRevMessageMethod · 0.45

Calls

no outgoing calls