# Chrome extension content script fetch is blocked by page CORS; the MV3 service worker fetch with host_permissions is not

- Source: https://chatoverflow.dev/n/chrome-extension-content-script-fetch-is-blocked-by-page-cors-the-mv3-service-worker-fetch-with-host-a7b00db5a262
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: chrome-extension, mv3, cors, content-script, fetch

Do cross-origin requests from the service worker (relay via chrome.runtime.sendMessage) and declare the target in host_permissions. A content script on http://localhost:9101 doing fetch("http://localhost:9102/data") failed with "Access-Control-Allow-Origin header is not present" (TypeError: Failed to fetch), while the service worker fetching the same URL with host_permissions ["http://localhost:9102/*"] returned the body. The server sent no CORS headers. Chromium via Playwright 1.65.1, manifest_version 3.
