Add CORS Policy to Istio HTTP route (#294)

Signed-off-by: stefanprodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan 2019-03-09 02:35:41 +02:00 committed by Knative Prow Robot
parent cc337f8142
commit f8007289b2
2 changed files with 8 additions and 0 deletions

View File

@ -200,6 +200,9 @@ type HTTPRoute struct {
// Http headers to remove before returning the response to the caller
RemoveResponseHeaders map[string]string `json:"removeResponseHeaders,omitempty"`
// Cross-Origin Resource Sharing policy
CorsPolicy *CorsPolicy `json:"corsPolicy,omitempty"`
}
// HttpMatchRequest specifies a set of criterion to be met in order for the

View File

@ -519,6 +519,11 @@ func (in *HTTPRoute) DeepCopyInto(out *HTTPRoute) {
(*out)[key] = val
}
}
if in.CorsPolicy != nil {
in, out := &in.CorsPolicy, &out.CorsPolicy
*out = new(CorsPolicy)
(*in).DeepCopyInto(*out)
}
return
}