Documentation
¶
Overview ¶
Package origins reads the origins file: the CORS settings every environment shares and, for each environment, its hosts and the browser origins it admits.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatternRegex ¶
PatternRegex keeps the meaning a Spring allowed-origin-pattern has: every character literal but *, which matches any run, dots included.
func SameOriginRegex ¶
SameOriginRegex admits the service's own origin on one of its hosts, on either scheme and any port.
Types ¶
type CORS ¶
type CORS struct{ AllowMethods, AllowHeaders, ExposeHeaders, MaxAge string } // "" when not written
type Environment ¶
type File ¶
type File struct {
CORS CORS
Environments []Environment // written order
}
File is the origins file after reading, with every rule below checked.