cors

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessControlAllowOrigin  = "Access-Control-Allow-Origin"
	AccessControlAllowMethods = "Access-Control-Allow-Methods"
	AccessControlAllowHeaders = "Access-Control-Allow-Headers"
)

Variables

Functions

func DeleteCorsHeaders

func DeleteCorsHeaders(response *http.Response)

func WithCorsMiddleware

func WithCorsMiddleware(corsHeaders map[string]string, next http.Handler) http.Handler

WithCorsMiddleware is a middleware that enables CORS for all requests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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