add cors_allow_preflight option to route policy

This commit is contained in:
nitper 2019-04-08 15:46:14 -04:00
parent c18f7d89ae
commit 45bb2e0a4d
No known key found for this signature in database
GPG key ID: CD5CDA95578CC143
8 changed files with 146 additions and 58 deletions

View file

@ -26,6 +26,10 @@ type Policy struct {
Source *url.URL
Destination *url.URL
// Allow unauthenticated HTTP OPTIONS requests as per the CORS spec
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Preflighted_requests
CORSAllowPreflight bool `yaml:"cors_allow_preflight"`
}
func (p *Policy) validate() (err error) {