'Programmatically disable blocking of private network requests in chrome sandbox
I'm using chrome-devel-sandbox bundled with puppeteer, and I need to disable blocking of private network requests. I am seeing this error:
Access to XMLHttpRequest at 'http://127.0.0.1' from origin 'https://example.com' has been blocked by CORS policy: Request had no target IP address space, yet the resource is in address space `local`
I tried the solutions in this answer, but these preference files seem to have no effect, and upon launching puppeteer the "Block Insecure Private Network Requests" flag in chrome://flags is reset to the defult value.
- Shouldn't the
--disable-web-securityflag take care of this already? - Is there a way to set this preference via a flag?
- Is there a preferences file that the sandboxed chrome will honor?
Looking at strace logs, it does appear that the sandboxed chromium process opens the file:
[pid 1177626] stat("/etc/chromium/policies/managed/dev_policy.json", {st_mode=S_IFREG|0644, st_size=236,
I even tried --no-sandbox without success.
I'm using Chrome 99 on debian.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
