Hello,
I have a webview within my packaged app.
And there is a javascript file that I injected into every page once the webview load a website.
The javascript will make a XHR POST to my local http server(established in my packaged app).
But when the webview navigates to a HTTPS site, the XHR was blocked :
I've already set this in my manifest.json : "permissions": ["<all_urls>"]
And not working.
My local Http server always send a response to a XHR with header:
HTTP/1.0 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Headers: origin, content-type, accept
But the webview just block the XHR since I never get a request or a connection from the HTTPS website.
As I know, the XHR was rejected by the target HTTP server if the server not allowing a cross-origin request.
Is there any way to avoid the webview blocking my XHR of my javascript?
Thank you