Hey,
I’m using Corsica to configure CORS
This is what the configuration looks like now
plug Corsica,
origins: [
MyApp.frontend_base_url(),
],
allow_credentials: true,
allow_headers: :all,
allow_methods: :all
The frontend is in a different subdomain and we want to send a http-only cookie within the request, that’s why the use of allow credentials.
In local development, this works fine when I make a request sending a Origin in the header. The Elixir application sends back the CORS headers just fine.
In production, the headers are completely different. Fly.io is somehow removing the headers and using other headers. The headers for CORS are not present when hosting through Fly.io
What am I missing here? Could Fly.io be interfering with the headers, or is there additional configuration I need to address for production?