Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckValidSpecStrict ¶
CheckValidSpecStrict checks if spec is valid and does not contain extra information.
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
func New ¶
New creates a T from a slice of origin spec. An origin spec consist of a mandatory host, with optionally scheme and port. As a special case, "*" matches any origin. An origin spec is lenient that extra userinfo, path, query or fragment are ignored silently.
func (*T) MatchOrigin ¶
MatchOrigin tells whether s is an allowed origin. s typically should be the value of HTTP header "Origin". MatchOrigin is lenient that extra userinfo, path , query or fragment in s are ignored silently.
Click to show internal directories.
Click to hide internal directories.