CORS Preflight Failing

Hello there! Recently in our production environment we started experiencing a 503 CORS error:

Access to XMLHttpRequest at ‘https:///com.snowplowanalytics.snowplow/tp2’ from origin ‘http://localhost:8000’ 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.

This doesn’t happen all the time, just intermittently. Our pipeline is currently configured with the following:
Route 53 → Load Balancer → Target Group → collector-server(ec2)

This pattern accepts HTTP/HTTPS at the load balancer before forwarding to port 8080 on a healthy instance. All of this has been deployed using the Snowplow terraform modules and cannot be replicated in any of our other environments.

Any advice/tips for this issue would be greatly appreciated!

This has been resolved. The issue was due to a separate load balancer attempting to forward traffic without healthy hosts.

1 Like