News for hackers. Stuff that matters.
Re:Show HN: BrowserBox – do stuff with browsers that you can... by supriyo-biswas on Saturday April 08, 2023 @12:54AM (#35490651)
`chromium-browser --disable-web-security --user-data-dir ~/chromium-cors-disabled-profile`
Re:Show HN: BrowserBox – do stuff with browsers that you can... by egeozcan on Saturday April 08, 2023 @01:17AM (#35490760)
This is perfectly fine for trusted sites, and I've used it a lot in the past for a few, but it disables cors for everything, and that's a bit too much.

What I wanted unrestricted access for my code, and that the sites kept the sandbox.

What I do nowadays is start a server that has basic auth and zero cors, that I can send commands to from my scripts, like, fetch me this resource without cors, or download this to this folder, etc.

Re:Show HN: BrowserBox – do stuff with browsers that you can... by purplecats on Saturday April 08, 2023 @02:17AM (#35490988)
what about `connect-src`
Re:Show HN: BrowserBox – do stuff with browsers that you can... by jjeaff on Saturday April 08, 2023 @04:57AM (#35491700)
I use the force-cors chrome extension. But I may be misunderstanding your use case.
Re:Show HN: BrowserBox – do stuff with browsers that you can... by jefftk on Saturday April 08, 2023 @07:30AM (#35492316)
This goes a lot farther than disabling CORS checking: it turns off all same origin policy enforcement.

So, ex, if site A opens a tab on site B (and so gets a reference to it), site A can read and modify anything on that page. Or, ads loaded in cross-origin items could read and modify anything on the containing page.

It's fine for testing, but don't log into any real accounts in this profile!

Re:Show HN: BrowserBox – do stuff with browsers that you can... by seanp2k2 on Sunday April 09, 2023 @12:27AM (#35500049)
Even more ridiculous is the HSTS requirement for localhost, which inspired me to share the techniques in https://github.com/ip2k/I-Dont-Care-About-HSTS-For-Localhost for automating a bit of the frankly ridiculous and idiotic process required to work around this. Who the heck needs a REAL SSL cert for local web dev, and why is it so hard to permanently override that?!