Im running a gatsby site on https://exclusieveauto.netlify.app/
I recently changed the primary domain from apex to www.exclusieveauto.nl
Whenever I visit the apex website, I get the cached website (probably because of gatsby-plugin-offline) with a bunch of CORS errors like:
Access to fetch at 'https://www.exclusieveauto.nl/page-data/app-data.json' (redirected from 'https://exclusieveauto.nl/page-data/app-data.json') from origin 'https://exclusieveauto.nl' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
at a point the gatsby site will crash because it’s not loading data properly.
What actually should happen, is that the user gets redirected to www. But because I have visited the website before and have the serviceworker i am stuck? I don’t know actually at what level that redirect should happen…
Any help is welcome