cors

package
v0.0.0-...-8d8ec1c Latest Latest
Warning

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

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

Documentation

Overview

Package cors - CORS (Cross Origin Resource Sharing) 을 지원하는 미들웨어 패키지

Index

Constants

View Source
const (
	// MWNamespace - Middleware 설정 식별자
	MWNamespace = "mw-cors"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AllowOrigins     []string      `yaml:"allow_origins"`
	AllowMethods     []string      `yaml:"allow_methods"`
	AllowHeaders     []string      `yaml:"allow_headers"`
	ExposeHeaders    []string      `yaml:"expose_headers"`
	AllowCredentials bool          `yaml:"allow_credentials"`
	MaxAge           time.Duration `yaml:"max_age"`
}

Config - Middleware 설정 정보 형식

func ParseConfig

func ParseConfig(mwConf config.MWConfig) *Config

ParseConfig - CORS 운영을 위한 Configuration parsing 처리

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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