cors

package
v1.3.29 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CORSAllowCredentials = "Access-Control-Allow-Credentials"
View Source
const CORSAllowHeaders = "Access-Control-Allow-Headers"
View Source
const CORSAllowMethods = "Access-Control-Allow-Methods"
View Source
const CORSAllowOrigin = "Access-Control-Allow-Origin"
View Source
const CORSExposeHeaders = "Access-Control-Expose-Headers"

Variables

This section is empty.

Functions

func New

func New(config Cfg) cors

Types

type CORS

type CORS interface {
	PutCORS(w http.ResponseWriter)
}

type Cfg

type Cfg struct {
	Enable           bool
	AllowOrigins     string
	AllowMethods     string
	AllowHeaders     string
	AllowCredentials bool
	ExposeHeaders    string
}

Jump to

Keyboard shortcuts

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