I'm trying to setup a simple redirect (not a proxy pass) in istio:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: test
spec:
gateways:
- test
hosts:
- test.com
http:
- redirect:
authority: testredirect.com
redirectCode: 302
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: test
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- test.com
port:
name: http
number: 80
protocol: HTTP2
This creates a redirect to http://testredirect.com
How do I get this to redirect to http**s**://
?
Notes:
DestinationRule
and ServiceEntry
, but that did not helpYou can try adding the response header with key as location and value as "https://testredirect.com" in the VirtualService.
redirect:
authority: "testredirect.com"
headers:
response:
set:
location: "https://testredirect.com"