I have created some lambda functions which worked fine locally however when I have uploaded them my app is not working.
When going directly to my api call from the url I am being served my 404 page.
Is this due to my _redirect file which I created to allow for react router to work?
Hi, @futuregerald I’m debugging a similar issue to what @AG-Labs explained. Site is deployed, but whenever I’m hitting a page that triggers a function I’m seeing a 404 in the network tab. Things are working okay locally, but still trying to eliminate causes. Site here
I’m having the same issue, but I do have the build command set up properly. At first I was getting a CORS error, then I added a headers section in my netlify.toml file, and that seems to have fixed the CORS error, but now I’m getting the 404 error due to what I’m assuming is the redirect rule that’s also in the .toml file.
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[build]
command = "yarn build && netlify-lambda build src/lambda"
functions = "built-lambda"
publish = "build"
[[headers]]
# Define which paths this specific [[headers]] block will cover.
for = "/*"
[headers.values]
Access-Control-Allow-Origin = "*"