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.