often, your server (localhost) needs to be configured to allow cors.
For example, I use the serve package from npm.
And have a folder with static ressources.
serve . # does not work, cors policy fails
serve --cors . #yay
So, I would say it’s serverside and probably a simple config option.