I am getting CORS Error, when I am tryong to call an endpoint fromm my ExpressJS Server… which is using requiresAuth() for auth0 authentication.
The error console is as follows:
“”“”““Access to fetch at ‘https://…’ (redirected from ‘http://localhost:3000/twitterbookmarker/showUserBookmark’) from origin ‘http://localhost:5500’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.””“”“”
My Express Server is running at : http://localhost:3000
My Front End Code is running at: http://localhost:5500
I went through a community question with a similar issue, but the issue is unresolved:
Also, http://localhost:5500 has been added to both “Allowed Web Origins” and “Allowed Origins (CORS)” in the application settings.
Please try and resolve this issue or guide me if it’s a mistake from my side ASAP, since it is a blocker.