CORS Missing Allow Origin in chirpstack V4

I have upgraded chirpstack v3 to v4. In v3 together with thingsboard it worked fine, but with v4 I have CORS problems (CORS Missing Allow Origin) when making a post request (/api/devices/{queueItem.devEui}/queue) .

V3 chirpstack-application-server.toml:

V4 /etc/chirpstack-rest-api/environment:

How can i fix this?

I am facing same problem.
I am trying to communicate with ChirpStack server using Vuejs. When I send request i got CORS error:

const response = await axios.get(“http://xx.xx.xx.xx:8090/api/gateways?limit=10”, {
headers: {
‘Accept’: “application/json”,
‘Grpc-Metadata-Authorization’: Bearer ${mytoken}

and getting below error

Access to XMLHttpRequest at ‘http://xx.xx.xx.xx:8090/api/gateways?limit=10’ from origin ‘http://localhost:5173’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

I am using chirpstack v4
I tried adding different variations of velow code to chirpstack.toml, chirpstack-gateway-bridge.toml and /etc/chirpstack-rest-api/environment (followed by corresponding service restart), but without success.

allowed_methods=[“GET”, “POST”, “PUT”, “DELETE”]
allowed_headers=[“Authorization”, “Grpc-Metadata-Authorization”, “Content-Type”]

Note that API itself is working fine if I try from Postman application.