From 54025a55ddfb4fe5eb6edd43b9cab0d5876d3558 Mon Sep 17 00:00:00 2001 From: savagebidoof Date: Fri, 5 May 2023 02:33:16 +0200 Subject: [PATCH] 04-HTTPRedirect --- .../04-HTTPRedirect/README.md | 60 ------------------- 1 file changed, 60 deletions(-) diff --git a/02-Traffic_management/04-HTTPRedirect/README.md b/02-Traffic_management/04-HTTPRedirect/README.md index 3b6ec0c..a6f5625 100755 --- a/02-Traffic_management/04-HTTPRedirect/README.md +++ b/02-Traffic_management/04-HTTPRedirect/README.md @@ -253,63 +253,3 @@ virtualservice.networking.istio.io "helloworld-vs" deleted - -# Continues from - -- 01-hello_world_1_service_1_deployment - - - -https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPRedirect - -## The idea is that this rewrite is handled "externally" by the client, not by Istio. - - - -## Practical examples - - -### HTTP to HTTPS redirect. - -The following Virtual Service configuration will redirect all the incoming traffic from the gateway `my-gateway` that uses the http protocol, to the https protocol. - -In this example, it would forward all the `http` traffic without taking into account which port is used. - -``` -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: to-https-vs -spec: - hosts: - - "*" - gateways: - - my-gateway - http: - - match: - - name: to_https - match: - scheme: http - redirect: - scheme: https -``` - -### Migrated from a domain - -The following will update the requests coming "to" the domain `old.domain.com` and rewrite the URL to use the "new" `new.domain.com` - -```yaml -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: update-domain-vs -spec: - hosts: - - "old.domain.com" - gateways: - - helloworld-gateway - http: - - name: forward-to-new-domain - redirect: - authority: "new.domain.com" -``` \ No newline at end of file