Hi guys, can you give some hints,
I need to forward traffic from a virtual service to an external servicethis is a use case example:
- user ask for foo.example.com/foo/bar
- virtual service forward traffic to www.google.com
- browser show www.google.com
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: google
namespace: default
spec:
hosts:
- www.google.com
location: MESH_EXTERNAL
ports:
- name: https
number: 443
protocol: TLS
resolution: DNS
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: settings-service-redirect-rules
spec:
gateways:
- default/default-gateway
hosts:
- foo.example.com
http:
- match:
- uri:
prefix: /foo/bar
name: images
rewrite:
authority: www.google.com
uri: /
route:
- destination:
host: www.google.com
port:
number: 443
What I expect, browser show www.google.com
What I’m getting: http error 400, The plain HTTP request was sent to HTTPS port
(edited)