Open jeanp413 opened 2 years ago
Created a PR #144515 fixing this. cc @alexdima
Are there verification steps for this?
@jeanp413 Could you please verify?
@alexdima not working
I have debugged this and the root cause is that these requests are not caught by the service worker installed on the main thread's origin. The only reasonable solution would be the one proposed in https://github.com/microsoft/vscode/pull/144515 where we would go to the main thread to make the request, but we would need to do this only for embedders like Codespaces.
hello
I received a similar error
Access to fetch at 'https://api.openai.com/v1/chat/completions' from origin 'vscode-file://vscode-app' 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.
For this release 1.65 work was done to make it possible to run an extension installed in the remote inside the web worker extension host https://github.com/microsoft/vscode/issues/141322
This works when running from sources because the web worker runs of the same origin, but the extension fails to activate both in gitpod and codespaces as the web worker runs on a different origin
It fails when fetching the extension entry point here due to a CORS error in the case of codespaces