Documentation
¶
Overview ¶
Package origins reads the browser origins: the CORS settings every environment shares and, for each environment, its hosts and the browser origins it admits. They are written in the proxyfile, or in an origins file it names.
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 after reading, from either place, with every rule below checked.