MCPcopy Create free account

hub / github.com/go-chi/cors / functions

Functions35 in github.com/go-chi/cors

↓ 11 callersFunctionNew
New creates a new Cors handler with the provided options.
cors.go:114
↓ 11 callersMethodlogf
convenience method. checks if a logger is set.
cors.go:333
↓ 7 callersMethodmatch
(s string)
utils.go:14
↓ 7 callersFunctionparseHeaderList
parseHeaderList tokenize + normalize a string containing a list of headers
utils.go:28
↓ 5 callersFunctionassertHeaders
(t *testing.T, resHeaders http.Header, expHeaders map[string]string)
cors_test.go:25
↓ 4 callersFunctionconvert
convert converts a list of string using the passed converter function
utils.go:19
↓ 4 callersMethodisMethodAllowed
isMethodAllowed checks if a given method can be used as part of a cross-domain request on the endpoint
cors.go:364
↓ 3 callersMethodhandleActualRequest
handleActualRequest handles simple cross-origin requests, actual request or redirects
cors.go:291
↓ 3 callersMethodhandlePreflight
handlePreflight handles pre-flight CORS requests
cors.go:237
↓ 2 callersMethodisOriginAllowed
isOriginAllowed checks if a given origin is allowed to perform cross-domain requests on the endpoint
cors.go:341
↓ 1 callersFunctionHandler
Handler creates a new Cors handler with passed options.
cors.go:186
↓ 1 callersMethodHandler
Handler apply the CORS specification on the request, and add relevant CORS headers as necessary.
cors.go:211
↓ 1 callersMethodPrintf
(string, ...interface{})
cors.go:76
↓ 1 callersMethodareHeadersAllowed
areHeadersAllowed checks if a given list of headers are allowed to used within a cross-domain request.
cors.go:384
FunctionAllowAll
AllowAll create a new Cors handler with permissive configuration allowing all origins with all standard methods with any header and credentials.
cors.go:193
FunctionAllowOriginFunc
(r *http.Request, origin string)
_example/main.go:79
FunctionBenchmarkParseHeaderList
(b *testing.B)
utils_test.go:51
FunctionBenchmarkParseHeaderListNormalized
(b *testing.B)
utils_test.go:65
FunctionBenchmarkParseHeaderListSingle
(b *testing.B)
utils_test.go:58
FunctionBenchmarkWildcard
(b *testing.B)
utils_test.go:72
FunctionTestConvert
(t *testing.T)
utils_test.go:26
FunctionTestDebug
(t *testing.T)
cors_test.go:403
FunctionTestDefault
(t *testing.T)
cors_test.go:413
FunctionTestHandleActualRequestInvalidMethodAbortion
(t *testing.T)
cors_test.go:471
FunctionTestHandleActualRequestInvalidOriginAbortion
(t *testing.T)
cors_test.go:456
FunctionTestHandlePreflightInvalidOriginAbortion
(t *testing.T)
cors_test.go:429
FunctionTestHandlePreflightNoOptionsAbortion
(t *testing.T)
cors_test.go:444
FunctionTestIsMethodAllowedReturnsFalseWithNoMethods
(t *testing.T)
cors_test.go:487
FunctionTestIsMethodAllowedReturnsTrueWithOptions
(t *testing.T)
cors_test.go:497
FunctionTestParseHeaderList
(t *testing.T)
utils_test.go:34
FunctionTestParseHeaderListEmpty
(t *testing.T)
utils_test.go:42
FunctionTestSpec
(t *testing.T)
cors_test.go:41
FunctionTestWildcard
(t *testing.T)
utils_test.go:8
FunctionassertResponse
(t *testing.T, res *httptest.ResponseRecorder, responseCode int)
cors_test.go:35
Functionmain
()
_example/main.go:57