Our app allows a user to add items to a cart and then submit an offer to buy the cart before checking out. (see the screenshot). On submit, the JSON payload from the offer is sent to an api endpoint backend workflow here in Bubble, we parse the JSON and process the offer and apply some rules the seller sets and send back a response.

Before the offer processes, bubble is indicating a CORS issue and throwing the 400 error. We could literally send offers from 1000 domains all at once so we need to solve that with the headers. We can do it in javascript but not sure how that script would work with workflow OR if we send the payload to an edge function and then route it to the backend workflow.