I have read many threads around this topic and I still can't wrap my head around it.
I've built a web app that allows users to crawl their website sitemap and add it to a document in Firebase. I'm using Firebase hosting to host the web app, which was pushed to a subdomain of mine.
I am using this package to crawl the sitemap - https://www.npmjs.com/package/get-sitemap-links
I get this error every time in production - "Access to XMLHttpRequest at 'https://www.userswebsite.com/page-sitemap.xml' from origin 'https://app.mywebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
I've not created any cloud functions for this web app but have read I have to enable CORS using a function. How can I do this?