Cannot fetch URL from content script

Hi,

I am trying to use the “fetch” API to retrieve data from my server from the content script. However, I receive the following error:

Content Security Policy: The page’s settings blocked the loading of a resource

I have added the URL to host_permissions, but it did not work. It works from the popup script though.

I have the same extension in Chrome and that works fine too. I don’t think it’s my server that’s blocking the request because it works from everywhere else. Besides, I tried to fetch “https://example.com/” and that also got blocked.

Any advice?

P/s this is manifest v3