cors

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOptions

func DefaultOptions() ports.CORSOptions

DefaultOptions returns sensible default CORS options.

func New

func New() ports.CORSHandler

New creates a new CORS handler that implements ports.CORSHandler.

Types

type Handler

type Handler struct{}

Handler provides CORS functionality.

func (*Handler) Handler

func (h *Handler) Handler(opts ports.CORSOptions) func(http.Handler) http.Handler

Handler returns a CORS handler with the given options.

Jump to

Keyboard shortcuts

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