e2b-dev / E2B

Secure open source cloud runtime for AI apps & AI agents
https://e2b.dev/docs
Apache License 2.0
6.6k stars 421 forks source link

SDK requests from browser to envd blocked via CORS #409

Open ValentaTomas opened 1 month ago

ValentaTomas commented 1 month ago

Envd seems to be blocking requests from browser because of CORS. The first OPTIONS request is successful but the next (start process) request fails on cors with no response headers.

We are setting CORS in envd server, but it looks like there still might be a problem.

ValentaTomas commented 1 month ago

This might be a problem with the SDK and not the envd server because a direct fetch call to the envd server seems to work.

ValentaTomas commented 1 month ago

This is a problem with either a wrong configuration of API client, envd client, and ConnectRpc transport (cors vs no-cors in the SDK) or with Nginx proxies that might be removing some headers (https://github.com/e2b-dev/infra/issues/94).