Documentation ¶
Overview ¶
Package cors provides the means for implementing the server side of CORS, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS.
Index ¶
Constants ¶
View Source
const OriginKey key = "origin"
OriginKey is the context key used to store the request origin match
Variables ¶
This section is empty.
Functions ¶
func HandlePreflight ¶
HandlePreflight returns a simple 200 response. The middleware takes care of handling CORS.
func MatchOrigin ¶
MatchOrigin returns true if the given Origin header value matches the origin specification.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.