cors

package
v2.16.19 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Namespace = "github_com/devopsfaith/krakend-cors"

Namespace is the key to look for extra configuration details

Variables

This section is empty.

Functions

func ConfigGetter

func ConfigGetter(e config.ExtraConfig) interface{}

ConfigGetter implements the config.ConfigGetter interface. It parses the extra config an allowed origin must be defined, the rest of the options will use a default if not defined.

Types

type Config

type Config struct {
	AllowOrigins         []string
	AllowMethods         []string
	AllowHeaders         []string
	ExposeHeaders        []string
	AllowCredentials     bool
	AllowPrivateNetwork  bool
	OptionsPassthrough   bool
	OptionsSuccessStatus int
	MaxAge               time.Duration
	Debug                bool
}

Config holds the configuration of CORS

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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