How to get web-app running in Istio Service Mesh?

UPDATE: Fixed by just adding routes for the redirection pages “/admin” and “/login” and it works. I thought this was covered by “/*”. but I guess not. So I will change my question to this: Is there a way to allow redirect to any page without specifying a route for each redirect?

When I port forward the service running the app it goes to

http://localhost:8080/login and I see a nice login page.

But trying to access it though the external load balancer IP address of the ingress I get a 301 and a blank page.

When I curl it I get this

> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< server: istio-envoy
< content-type: text/html; charset=UTF-8
< date: Wed, 10 Jul 2019 14:12:28 GMT
< location: /admin
< set-cookie: XSRF-TOKEN=eryue78```


Here is my configuration:


```apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: my-gateway
  annotations:
spec:
  selector:
    istio: ingressgateway # use istio default controller
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: my-vs
spec:
  hosts:
  - "*"
  gateways:
  - my-gateway
  http:
  - match:
    - uri:
        prefix: "/"
    route:
    - destination:
        host: my-app
        port:
          number: 80
    - match:
    - uri:
        prefix: "/*"
    route:
    - destination:
        host: my-app
        port:
          number: 80```


coffee:yaml Steven$ curl $GATEWAY_IP
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="refresh" content="0;url=/admin" />
        <title>Redirecting to /admin</title>
    </head>
    <body>
        Redirecting to <a href="/admin">/admin</a>.
 </body>
</html>

UPDATE: Fixed by just adding routes for the redirection pages “/admin” and “/login” and it works. I thought this was covered by “/*”. but I guess not. Is there a way to allow any redirects without specifying each one?