Documentation
¶
Index ¶
- type CORS
- func (c *CORS) EncodeAllowCredentialsHeader() string
- func (c *CORS) EncodeAllowHeaders() string
- func (c *CORS) EncodeExposeHeaders() string
- func (c *CORS) EncodePreflightMaxAgeSeconds() string
- func (c *CORS) EncodedAllowMethods() string
- func (c *CORS) HeadersAllowed(headers []string) bool
- func (c *CORS) MethodAllowed(method string) bool
- func (c *CORS) OriginAllowed(origin string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORS ¶
type CORS struct {
Enabled bool
// allow configuration
AllowOrigins []string
AllowMethods []string
AllowHeaders []string
AllowCredentials bool
ExposeHeaders []string
// preflight
PreflightRequestMethod string
PreflightMaxAgeSeconds *int
// contains filtered or unexported fields
}
func (*CORS) EncodeAllowCredentialsHeader ¶
func (*CORS) EncodeAllowHeaders ¶
func (*CORS) EncodeExposeHeaders ¶
func (*CORS) EncodePreflightMaxAgeSeconds ¶
func (*CORS) EncodedAllowMethods ¶
func (*CORS) HeadersAllowed ¶
func (*CORS) MethodAllowed ¶
func (*CORS) OriginAllowed ¶
Click to show internal directories.
Click to hide internal directories.