You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I must be missing a basic step. I'm using allow_origin to restrict requests to my API, e.g.:
'allow_origin'=>'https://x.com',
When I call the API (e.g., from https://example.com), I see an error in the developer console:
Failed to load https://.../api/testpost: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://example.com' is therefore not allowed access.
But the data is inserted into the database (this is a POST) and I get the new id back in the response.
Am I supposed to handle a CORS failure myself, and make sure to terminate the request?