Vsix extension installation blocked by CORS

I’m running Theia on docker, based on the latest theiade/theia image. My container has been started with the following command:
docker run --init -d -p 3000:3000 --name=theia theiaide/theia

When I try to install an extension (for example IntelliJ IDEA keybindings), I get the following error:

Access to fetch at 'https://open-vsx.org/api/-/query' from origin 'http://theia.docker_internal' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Note that I am running Theia behind a corporate proxy, but the proxy should be well configured through env passed during the container run, as I can wget and curl remote addresses.

Is there a way to configure the cors policy used by Theia’s requests ? Or is there an other way to install an extension at runtime ?

Thank you for you help !

Hi @neophat,

This looks like a known open-vsx issue. This is not directly related to open-vsx but more due the setup that eclipse is using. See also this Theia issue. Perhaps something in the first linked issue can help resolve your problem.

1 Like