Proxy redirect using netlify.toml

I’m using Axios in React to scrape data from https://www.finanzen.net/ which i want to use on page. On localhost i was using a local proxy to prevent the known CORS issue. Now i want to set it up to work with my Netlify page https://lucky-toffee-34af45.netlify.app/

I looked at most of the posts related to this topic here but i can’t get it to work, ending up with a 404 error.

After building my netlify.toml sits right next to index.html.

netlify.toml:

[[redirects]]
  from = "/search"
  to = "https://www.finanzen.net/"
  status = 200
  force = true
  headers = {X-From = "Netlify"}

What the URL looks like i would try to fetch from:

https://lucky-toffee-34af45.netlify.app/search/etf/ishares-automation-robotics-etf-ie00byzk4552/tgt

Any help is appreciated

Change you redirect to:

[[redirects]]
  from = "/search/*"
  to = "https://www.finanzen.net/:splat"
  status = 200
  force = true
1 Like