@crawlee/http-client 4.0.0-beta.184 → 4.0.0-beta.186

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,6 +93,12 @@ export class BaseHttpClient {
93
93
  }
94
94
  const nextHeaders = new Headers();
95
95
  currentRequest.headers.forEach((value, key) => nextHeaders.set(key, value));
96
+ // Like native `fetch`, do not forward credentials to a different origin
97
+ if (nextUrl.origin !== new URL(currentRequest.url).origin) {
98
+ for (const header of ['authorization', 'proxy-authorization', 'cookie']) {
99
+ nextHeaders.delete(header);
100
+ }
101
+ }
96
102
  return new Request(nextUrl.toString(), {
97
103
  method: nextMethod,
98
104
  headers: nextHeaders,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/http-client",
3
- "version": "4.0.0-beta.184",
3
+ "version": "4.0.0-beta.186",
4
4
  "description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
5
5
  "engines": {
6
6
  "node": ">=22.0.0"
@@ -47,7 +47,7 @@
47
47
  "access": "public"
48
48
  },
49
49
  "dependencies": {
50
- "@crawlee/types": "4.0.0-beta.184",
50
+ "@crawlee/types": "4.0.0-beta.186",
51
51
  "tough-cookie": "^6.0.0"
52
52
  },
53
53
  "lerna": {
@@ -57,5 +57,5 @@
57
57
  }
58
58
  }
59
59
  },
60
- "gitHead": "19ebeeb9bb90e38496cbe90565c8ebb02e102193"
60
+ "gitHead": "d15c77259254640d55d0492a196d1bc6a89ecd0b"
61
61
  }