cors

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANNOTATION_CORS_ENABLE      = "nginx.ingress.kubernetes.io/enable-cors"
	ANNOTATION_CORS_METHODS     = "nginx.ingress.kubernetes.io/cors-allow-methods"
	ANNOTATION_CORS_HEADERS     = "nginx.ingress.kubernetes.io/cors-allow-headers"
	ANNOTATION_CORS_ORIGIN      = "nginx.ingress.kubernetes.io/cors-allow-origin"
	ANNOTATION_CORS_CREDENTIALS = "nginx.ingress.kubernetes.io/cors-allow-credentials"
	ANNOTATION_CORS_MAXAGE      = "nginx.ingress.kubernetes.io/cors-max-age"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy struct {
	apipolicy.BasePolicy
}

func (Policy) CreateDefaultConfig

func (policy Policy) CreateDefaultConfig(ctx map[string]interface{}) apipolicy.PolicyDto

func (Policy) MergeDiceConfig

func (policy Policy) MergeDiceConfig(conf map[string]interface{}) (apipolicy.PolicyDto, error)

func (Policy) ParseConfig

func (policy Policy) ParseConfig(dto apipolicy.PolicyDto, ctx map[string]interface{}) (apipolicy.PolicyConfig, error)

func (Policy) UnmarshalConfig

func (policy Policy) UnmarshalConfig(config []byte) (apipolicy.PolicyDto, error, string)

type PolicyDto

type PolicyDto struct {
	apipolicy.BaseDto
	Methods     string `json:"methods"`
	Headers     string `json:"headers"`
	Origin      string `json:"origin"`
	Credentials bool   `json:"credentials"`
	MaxAge      int64  `json:"maxAge"`
}

func (PolicyDto) IsValidDto

func (dto PolicyDto) IsValidDto() (bool, string)

Jump to

Keyboard shortcuts

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