Documentation ¶
Index ¶
- Constants
- Variables
- func Register(register eosc.IExtenderDriverRegister)
- type Checker
- type Config
- type CorsFilter
- func (c *CorsFilter) CheckSkill(skill string) bool
- func (c *CorsFilter) Destroy()
- func (c *CorsFilter) DoFilter(ctx http_service.IHttpContext, next http_service.IChain) (err error)
- func (c *CorsFilter) Id() string
- func (c *CorsFilter) Reset(conf interface{}, workers map[eosc.RequireId]interface{}) error
- func (c *CorsFilter) Start() error
- func (c *CorsFilter) Stop() error
- func (c *CorsFilter) WriteHeader(ctx http_service.IHttpContext)
- type Driver
- type Factory
- type ICheck
- type IHeader
Constants ¶
View Source
const (
Name = "cors"
)
Variables ¶
View Source
var (
ErrorCredentialTypeError = errors.New("the other options cannot be `*` when `allowCredentials` is true")
)
Functions ¶
func Register ¶
func Register(register eosc.IExtenderDriverRegister)
Types ¶
type Config ¶
type Config struct { AllowOrigins string `json:"allow_origins"` AllowMethods string `json:"allow_methods"` AllowCredentials bool `json:"allow_credentials"` AllowHeaders string `json:"allow_headers"` ExposeHeaders string `json:"expose_headers"` MaxAge int32 `json:"max_age"` ResponseType string `json:"response_type"` }
type CorsFilter ¶
type CorsFilter struct { *Driver // contains filtered or unexported fields }
func (*CorsFilter) CheckSkill ¶
func (c *CorsFilter) CheckSkill(skill string) bool
func (*CorsFilter) Destroy ¶
func (c *CorsFilter) Destroy()
func (*CorsFilter) DoFilter ¶
func (c *CorsFilter) DoFilter(ctx http_service.IHttpContext, next http_service.IChain) (err error)
func (*CorsFilter) Id ¶
func (c *CorsFilter) Id() string
func (*CorsFilter) Reset ¶
func (c *CorsFilter) Reset(conf interface{}, workers map[eosc.RequireId]interface{}) error
func (*CorsFilter) Start ¶
func (c *CorsFilter) Start() error
func (*CorsFilter) Stop ¶
func (c *CorsFilter) Stop() error
func (*CorsFilter) WriteHeader ¶
func (c *CorsFilter) WriteHeader(ctx http_service.IHttpContext)
WriteHeader CORS响应告诉本服务的规则
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) ConfigType ¶
Click to show internal directories.
Click to hide internal directories.