Documentation ¶
Index ¶
Constants ¶
View Source
const ( AllowHeadersKey = "Access-Control-Allow-Headers" AllowedHeaders = "Accept, Content-Type, Content-Length, Accept-Encoding, Authorization, ResponseType" AllowOriginKey = "Access-Control-Allow-Origin" AllowMethodsKey = "Access-Control-Allow-Methods" AllowedMethods = "GET, POST" )
Variables ¶
This section is empty.
Functions ¶
func CORS ¶
func CORS(handler http.Handler) http.HandlerFunc
CORS allows for Cross-Origin Request Sharing for all domains (*) for all routes on a handler. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS for more details.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.