Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAllowHeaders ¶
func AddAllowHeaders(header *fasthttp.ResponseHeader, headers ...string)
AddAllowHeaders sets the allowed headers.
func Middleware ¶
func Middleware(fn func(w *fasthttp.ResponseHeader), origins ...string) func(fasthttp.RequestHandler) fasthttp.RequestHandler
Middleware returns a middleware that adds CORS headers to the response.
func NotAllowedHandler ¶
func NotAllowedHandler(fn func(w *fasthttp.Response), origins ...string) fasthttp.RequestHandler
NotAllowedHandler handles cross domain not allowed requests. At most one origin can be specified, other origins are ignored if given, default to be *.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.