0

I have a CORS issue on my netlify functions. enter image description here

Here's my netlify.toml but it doesn't help at all. Anyone can help me with this?

  • [Please do not upload images of code/data/errors when asking a question.](//meta.stackoverflow.com/q/285551) – jub0bs Jul 24 '22 at 19:55

1 Answers1

-1

You have missed an indent after the for = "/*" line

  [[headers]]
      # Define which paths this specific [[headers]] block will cover.
      for = "/*"
        [headers.values]
        Access-Control-Allow-Origin = "*"

Inspect the build log, and you can easily find the rejection of the false rule by Netlify.

More ref - https://answers.netlify.com/t/access-control-allow-origin-policy/1813/2

Rumira Daksith
  • 219
  • 1
  • 4
  • 15