router: add scheme and port redirect actions (#3060) (#4570)

Add scheme and port redirects which replace the respective
URI components when applied.

Fixes issue #3060.

Signed-off-by: Nikolay Nikolaev <nnikolay@vmware.com>

Mirrored from https://github.com/envoyproxy/envoy @ 057edf16474df8f1ed834dbfa8ceefb45613b3a4
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent fd2c75e3ab
commit dfad47edd3
  1. 11
      envoy/api/v2/route/route.proto

@ -771,8 +771,16 @@ message RouteAction {
}
message RedirectAction {
oneof scheme_rewrite_specifier {
// The scheme portion of the URL will be swapped with "https".
bool https_redirect = 4;
// The scheme portion of the URL will be swapped with this value.
string scheme_redirect = 7;
}
// The host portion of the URL will be swapped with this value.
string host_redirect = 1;
// The port value of the URL will be swapped with this value.
uint32 port_redirect = 8;
oneof path_rewrite_specifier {
// The path portion of the URL will be swapped with this value.
@ -810,9 +818,6 @@ message RedirectAction {
// code is MOVED_PERMANENTLY (301).
RedirectResponseCode response_code = 3 [(validate.rules).enum.defined_only = true];
// The scheme portion of the URL will be swapped with "https".
bool https_redirect = 4;
// Indicates that during redirection, the query portion of the URL will
// be removed. Default value is false.
bool strip_query = 6;

Loading…
Cancel
Save