Can I add CORS in the Limina container?
To reduce security concerns, we do not support adding CORS in the container. However, there are well known web development patterns that allow us to call APIs from the browser while still respecting CORS headers.How to resolve CORS issues from the browser?
There are many established patterns for dealing with CORS headers. We will explain two common patterns, however this is not an exhaustive list. The solution you ultimately end up going with will depend on your web technologies and current application architecture.1. Configure a Backend or API Gateway to Allow CORS
CORS specifically was made to protect against browser-based vulnerabilities. You can access the Limina container’s APIs from an API gateway or backend without any CORS headers required. That API Gateway or backend can then in-turn have CORS configured for the domain of your front-end application. In this diagram, we’ve set up an API Gateway to allow our website’s (website.com) origin to have access to the api-gateway.com resources. Because CORS isn’t required for server-to-server interaction, the connection fromapi-gateway.com to api.private-ai.com does not need require CORS headers for it to be successful.