Access to fetch at xxx from origin 'chrome-extension://clkhibkobgfbolfmgccmlfhjjdckgmah'

444 views
Skip to first unread message

bolin liao

unread,
Dec 28, 2022, 1:16:28 AM12/28/22
to Chromium Extensions
My site send cors request by chrome extension, but I get below error recently.

Access to fetch at 'http://test.sit91.com/api/follow/list?uid=1' from origin 'chrome-extension://clkhibkobgfbolfmgccmlfhjjdckgmah' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `private`.

I kown that the error cause by "Private Network Access"。I want to solve it by enable "chrome://flags/#unsafely-treat-insecure-origin-as-secure", but i can not config 'chrome-extension://clkhibkobgfbolfmgccmlfhjjdckgmah'  to it`s textarea。

chrome extension version:  v3
chrome version: 108.0.5359.124
 
And i try set Access-Control-Allow-Private-Network: true in response headers in preflight request, but it not working

It working when I use my v2 chrome extension
How do i solve the problem?

Many thanks in advance,

Akash Kumar

unread,
Dec 28, 2022, 5:02:02 AM12/28/22
to Chromium Extensions, liaob...@gmail.com
try this in manifest

"host_permissions": [

    "*://*/*"

  ]


Reply all
Reply to author
Forward
Message has been deleted
0 new messages