My personal website hosted locally at cocostraws.com requires CORS to function properly. I have added the necessary CORS headers for each API link in my Python code.
https://i.sstatic.net/ctysO.png
You can examine the complete files app.py and index.js. This code used to function flawlessly months ago, but now that I've brought it back online, a CORS issue has surfaced. Strangely, if I leave the loaded website idle for some time (around 15 minutes perhaps) and return later, the CORS problem disappears. This erratic behavior is frustrating me as I cannot pinpoint the exact cause. I have exhausted all possible solutions I could think of. Any assistance would be greatly appreciated.
PS: When I switched to using Firefox, the CORS problem vanished. Can anyone shed light on this mystery?