I’m trying to access test netlify functions locally using netlify dev.
When I call a function, the function does not run, and I receive this error:
The Same Origin Policy disallows reading the remote resource at http://localhost:3000/.netlify/functions/testing
The server is running on localhost:8888
I’ve tried it with and without adding the following to netlify.toml
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[[headers]]
for = "/"
[headers.values]
Access-Control-Allow-Origin = "*"
I’ve tried adding the Access-Control-Allow-Origin = "*"
header to the response of the function.
It’s not that the response is blocked. The function doesn’t run.
I’ve tried turning it off and back on again.
Not sure what else to do. I have other projects that use netlify functions fine. But this specific project, despite having the exact same setup, just doesn’t work.
Has there been a breaking change to netlify dev? Have I made some rookie error? Any point in the right direction would be really appreciated. Thanks.