Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I got some solutions to send below in response header but It didn't work
do we need to do something for the custom endpoint to make it accessible from the localhost?
Please give your thoughts else I have to move my code to the functions from the custom endpoints.
Please see our docs on how to create a HTTP Options Event Handler, available from Live API Creator 4.1 onwards.
From within the code editor of an Options Event (Request Events > Add > Options Event), there is code example available on how to modify the CORS response as well.
Hope this clarifies your question.
Were you able to resolve the issue? What was the final result?
Stephen HughesBroadcom Support