No, I was just about to ask essentially the same question, which I thought would be extremely basic:
IDX + Static Website + PWA w/ service worker + CORS = how?
I have seen other “remotely” similar questions (pardon the pun), which references their guidance for full stack programming, which includes credential passing. But in my case, I just want to add a manifest.json
file + service worker to a static website in order to make that site a PWA. I don’t have a back end to connect to, just the static site. I can actually manually navigate to the manifest.json and it will serve it to my browser, as it is in the same root directory as index.html
. But it throws the CORS errors before any of my scripts are even running (so it isn’t a problem with the service worker code). My best guess is that when parsing the index.html
it tries to load the manifest via the <link rel="manifest" href="manifest.json">
line, and that is where the CORS is blocking it.
I would have thought that PWA’s were a primary use case for Project IDX, so I was a bit surprised when I couldn’t find any documentation for this particular problem. I was hoping that you had fixed it and just hadn’t posted it!!