CORS error occurs only when SPA deployed on Netlify

My site
New to Netlify and I am having trouble with my site on deployment. It is a Vue SPA scaffolded with vue-cli 3. The trouble is this. On one of the pages I do a fetch to the API at and I am getting an error message:

" Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at [ etc… (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)."

I googled and found and tried this solution to no avail. I can see from dev tools that the server is not returning the correct headers. When I was in development mode using the vue-cli dev server I never ran into this problem?? Here are the pertinent Headers for my local server and when deployed to Netlify:

Local Server (Page loads ok)-
{“Response Headers (797 B)”:
{“name”:“access-control-allow-headers”,“value”:“x-api-key, authorization”},

{"Request Headers (622 B)":{"name":"Host","value":""},{"name":"Origin","value":"http://localhost:8080"},{"name":"Pragma","value":"no-cache"},{"name":"Referer","value":"http://localhost:8080/headlines"},

Netlify Deploy:
{“Response Headers (674 B)”:

{"Request Header":

The fetch is:
const url =${queryString}&from=${lastWeek}&pageSize=${this.pageSize}&domains=${domains}&excludeDomains=${excludeDomains}&language=en&sortBy=publishedAt&apiKey=${news_api_key};
// Just a little different way of implementing fetch()
const req = new Request(url);
.then(response => {

from = “/*”
to = “/index.html”
status = 200

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

Notice the server didn’t respond with a "name":"access-control-allow-origin","value":"*" Header when page was served from netlify !

I’ve done reading on CORS to no avail. I don’t believe I should have to implement a proxy if the the dev server can serve page fine. I hope someone here can help with this one. Thanx in advance.

hi there, you should definitely check this thread. It seems like NewsAPI changed some of their requirements lately. I am going to close this thread to prevent duplication, but please feel free to continue the conversation on this thread: