Closed erikNeville closed 5 years ago
For further understanding of what I'm trying to do, here is my commit for the code I have so far: https://github.com/ActoKids/web-ui/pull/34/commits/f6f3911b14cbc165b7f457f4bd27c33ccd3497a7
I think the error is in your URL / endpoint call. I've marked the line in your code with a comment, but essentially it looks like you're trying to call /v1/event/{event_id}, but that is not a valid endpoint. The endpoint is /v1/events/{event_id}.
Presuming you're just trying to GET by id:
That is the same event_id and it works as a GET.
Issue with access control due to the header being present on the requested resource.
I am trying to use the event_id, which is generated through AWS, as a way to pass props to another react Component, and I am receiving this error:
No 'Access-Control-Allow-Origin' header is present on the requested resource
Here is a shot of there being no issues with CORS headers on our dashboard:
And a shot of the error I get when I try to use the ID in a header:
A link I've been reading through to understand this issue: https://serverless-stack.com/chapters/handle-api-gateway-cors-errors.html