Skip to content

Commit

Permalink
Merge pull request #604 from weaveworks/cors-allow-origins
Browse files Browse the repository at this point in the history
Add allow origins field to CORS spec
  • Loading branch information
stefanprodan authored Jun 1, 2020
2 parents d2fe182 + 6db5b5c commit 3307694
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/apis/istio/v1alpha3/virtual_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,12 @@ type CorsPolicy struct {
// header. Wildcard * will allow all origins.
AllowOrigin []string `json:"allowOrigin,omitempty"`

// String patterns that match allowed origins. An origin is allowed if
// any of the string matchers match. If a match is found, then the
// outgoing Access-Control-Allow-Origin would be set to the origin as
// provided by the client.
AllowOrigins []*v1alpha1.StringMatch `json:"allowOrigins,omitempty"`

// List of HTTP methods allowed to access the resource. The content will
// be serialized into the Access-Control-Allow-Methods header.
AllowMethods []string `json:"allowMethods,omitempty"`
Expand Down
11 changes: 11 additions & 0 deletions pkg/apis/istio/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3307694

Please sign in to comment.