Skip to content
← Back to Community
Fetch is not working
Profile icon
kevinvictorin

The fetch method doesn't return the response and log to the console. The url works correctly.

Voters
Profile icon
ChristoferWijay
Profile icon
ipatrikxz
Profile icon
kevinvictorin
Comments
hotnewtop
Profile icon
amasad

@kevinvictorin it looks like a CORS issue. See this for adding CORS support to your server: https://expressjs.com/en/resources/middleware/cors.html#enable-cors-for-a-single-route

Also make sure to use https instead of http because if the site is served from https origin it won't let you load from http. See https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content