Setting access-control-allow-origin: "*"

Im trying to set the cors policty to allow all, a very common setting but it seems impossible to set on Istio, anyone has a solution to this?.

Ive tried setting

 headers:
      response:
        set:
          Access-Control-Allow-Origin: "*"

as well as


 corsPolicy:
      allowOrigin:
      - "*"

Any help would be greatly appriciated

Hi daniel,

I had same problem. I can get answer for “*” do this with this code (istio 1.6.4):
PS: I don’t recommend this code for production environment.

`corsPolicy:
    allowOrigins:
      - exact: "*"
    allowMethods:
      - POST
      - GET
      - PUT
      - DELETE
      - OPTIONS
    allowCredentials: true
    allowHeaders:
      - Content-Type
      - Authorization
    maxAge: "24h"`