cors

package
v0.0.0-...-8ce278b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL