From 09d2c4a4eab98b747598a31da64463dc5e360071 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Tue, 10 Jul 2018 03:07:07 +0000 Subject: [PATCH] cors: allow using regexes to match origins (#3769) Resolves https://github.com/envoyproxy/envoy/issues/2526 Signed-off-by: Neri Marschik Mirrored from https://github.com/envoyproxy/envoy @ 00bb039a78f66b7cd42acedd9b2d3dc52bfb605d --- envoy/api/v2/route/route.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/envoy/api/v2/route/route.proto b/envoy/api/v2/route/route.proto index b558f6f0..52906b51 100644 --- a/envoy/api/v2/route/route.proto +++ b/envoy/api/v2/route/route.proto @@ -282,10 +282,18 @@ message RouteMatch { repeated QueryParameterMatcher query_parameters = 7; } +// [#comment:next free field: 9] message CorsPolicy { // Specifies the origins that will be allowed to do CORS requests. + // + // An origin is allowed if either allow_origin or allow_origin_regex match. repeated string allow_origin = 1; + // Specifies regex patterns that match allowed origins. + // + // An origin is allowed if either allow_origin or allow_origin_regex match. + repeated string allow_origin_regex = 8; + // Specifies the content for the *access-control-allow-methods* header. string allow_methods = 2;