Documentation
¶
Overview ¶
Package cors provides CORS configuration types and XML helpers.
Package cors provides CORS configuration types for buckets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoCORSConfig is returned when no CORS configuration exists. ErrNoCORSConfig = errors.New("cors: bucket has no CORS configuration") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
XMLNS string `xml:"xmlns,attr,omitempty"`
XMLName xml.Name `xml:"CORSConfiguration"`
CORSRules []Rule `xml:"CORSRule"`
}
Config represents a bucket CORS configuration.
func ParseBucketCORSConfig ¶ added in v1.0.5
ParseBucketCORSConfig parses a CORS configuration in XML from an io.Reader.
type Rule ¶
type Rule struct {
AllowedHeader []string `xml:"AllowedHeader,omitempty"`
AllowedMethod []string `xml:"AllowedMethod,omitempty"`
AllowedOrigin []string `xml:"AllowedOrigin,omitempty"`
ExposeHeader []string `xml:"ExposeHeader,omitempty"`
ID string `xml:"ID,omitempty"`
MaxAgeSeconds int `xml:"MaxAgeSeconds,omitempty"`
}
Rule represents a single CORS rule.
Click to show internal directories.
Click to hide internal directories.