Skip to content

Commit

Permalink
Remove disable-web-security chrome flag (#53)
Browse files Browse the repository at this point in the history
Fix `Origin` header on requests
  • Loading branch information
ballercat authored May 1, 2024
1 parent cde31ed commit aba8ae3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.1 - Remove disable web security flags

- fix: `--disable-web-security` removed. This causes Chrome to omit the Origin
header when enabled.

## 0.2.0 - Add support for native `fetch` proxying

- feat: Support `globalThis.fetch` proxying, allowing native fetch requests to be cached/stubbed/etc
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jambox",
"version": "0.2.0",
"version": "0.2.1",
"description": "Tool for recording and playing back HTTP requests.",
"bin": {
"jam": "./jam.mjs",
Expand Down
5 changes: 2 additions & 3 deletions src/browser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ const mac = ({ chrome, uri, info }) => {
'--args',
uri,
'--args',
'--disable-web-security',
'--disable-features=ChromeWhatsNewUI',
'--disable-background-networking',
'--disable-component-update',
'--check-for-update-interval=31536000',
// Proxy
`--proxy-server=${info.proxy.http}`,
`--proxy-bypass-list=${info.noProxy.join(',')}`,
// https://www.chromium.org/developers/design-documents/network-settings/
`--proxy-bypass-list="${info.noProxy.join(';')}"`,
// FIXME: Don't depend on browser-launchers profile
`--user-data-dir=${
osenv.home() +
Expand Down Expand Up @@ -88,7 +88,6 @@ async function launchProxiedChrome(uri, info) {
detached: true,
profile: null,
options: [
'--disable-web-security',
`--ignore-certificate-errors-spki-list=${SPKI_FINGERPRINT}`,
'--disable-features=ChromeWhatsNewUI',
'--disable-background-networking',
Expand Down

0 comments on commit aba8ae3

Please sign in to comment.