Documentation
¶
Index ¶
- func AllowAllOrigin(next http.HandlerFunc) http.HandlerFunc
- func AllowHeaders(headers ...string) corsOption
- func AllowMethods(methods ...string) corsOption
- func AllowOrigin(origin string) corsOption
- func CORS(opts ...corsOption) func(http.HandlerFunc) http.HandlerFunc
- func MaxAge(d time.Duration) corsOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowAllOrigin ¶
func AllowAllOrigin(next http.HandlerFunc) http.HandlerFunc
func AllowHeaders ¶
func AllowHeaders(headers ...string) corsOption
func AllowMethods ¶
func AllowMethods(methods ...string) corsOption
func AllowOrigin ¶
func AllowOrigin(origin string) corsOption
func CORS ¶
func CORS(opts ...corsOption) func(http.HandlerFunc) http.HandlerFunc
Default allows all origins methods, all headers, and sets the max age to 1 day. Acts as a terminal middleware if the request is an OPTIONS request.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.