@@ -261,12 +261,22 @@ const readableWebStream = response.body
261
261
const readableNodeStream = Readable.fromWeb(readableWebStream)
262
262
```
263
263
264
-
#### Specification Compliance
264
+
## Specification Compliance
265
265
266
-
This section documents parts of the [Fetch Standard](https://fetch.spec.whatwg.org) that Undici does
266
+
This section documents parts of the [HTTP/1.1](https://www.rfc-editor.org/rfc/rfc9110.html) and [Fetch Standard](https://fetch.spec.whatwg.org) that Undici does
267
267
not support or does not fully implement.
268
268
269
-
##### Garbage Collection
269
+
#### CORS
270
+
271
+
Unlike browsers, Undici does not implement CORS (Cross-Origin Resource Sharing) checks by default. This means:
272
+
273
+
- No preflight requests are automatically sent for cross-origin requests
274
+
- No validation of `Access-Control-Allow-Origin` headers is performed
275
+
- Requests to any origin are allowed regardless of the source
276
+
277
+
This behavior is intentional for server-side environments where CORS restrictions are typically unnecessary. If your application requires CORS-like protections, you will need to implement these checks manually.
278
+
279
+
#### Garbage Collection
270
280
271
281
* https://fetch.spec.whatwg.org/#garbage-collection
272
282
@@ -307,7 +317,7 @@ const headers = await fetch(url, { method: 'HEAD' })
307
317
.then(res => res.headers)
308
318
```
309
319
310
-
##### Forbidden and Safelisted Header Names
320
+
#### Forbidden and Safelisted Header Names
311
321
312
322
* https://fetch.spec.whatwg.org/#cors-safelisted-response-header-name
313
323
* https://fetch.spec.whatwg.org/#forbidden-header-name
@@ -316,7 +326,7 @@ const headers = await fetch(url, { method: 'HEAD' })
316
326
317
327
The [Fetch Standard](https://fetch.spec.whatwg.org) requires implementations to exclude certain headers from requests and responses. In browser environments, some headers are forbidden so the user agent remains in full control over them. In Undici, these constraints are removed to give more control to the user.
318
328
319
-
### `undici.upgrade([url, options]): Promise`
329
+
#### `undici.upgrade([url, options]): Promise`
320
330
321
331
Upgrade to a different protocol. See [MDN - HTTP - Protocol upgrade mechanism](https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism) for more details.
322
332
@@ -378,20 +388,15 @@ Returns: `URL`
378
388
* **protocol** `string` (optional)
379
389
* **search** `string` (optional)
380
390
381
-
## Specification Compliance
382
-
383
-
This section documents parts of the HTTP/1.1 specification that Undici does
384
-
not support or does not fully implement.
385
-
386
-
### Expect
391
+
#### Expect
387
392
388
393
Undici does not support the `Expect` request header field. The request
389
394
body is always immediately sent and the `100 Continue` response will be
390
395
ignored.
391
396
392
397
Refs: https://tools.ietf.org/html/rfc7231#section-5.1.1
393
398
394
-
### Pipelining
399
+
#### Pipelining
395
400
396
401
Undici will only use pipelining if configured with a `pipelining` factor
397
402
greater than `1`. Also it is important to pass `blocking: false` to the
@@ -412,7 +417,7 @@ aborted.
412
417
* Refs: https://tools.ietf.org/html/rfc2616#section-8.1.2.2
413
418
* Refs: https://tools.ietf.org/html/rfc7230#section-6.3.2
414
419
415
-
### Manual Redirect
420
+
#### Manual Redirect
416
421
417
422
Since it is not possible to manually follow an HTTP redirect on the server-side,
418
423
Undici returns the actual response instead of an `opaqueredirect` filtered one
@@ -421,9 +426,9 @@ implementations in Deno and Cloudflare Workers.
421
426
422
427
Refs: https://fetch.spec.whatwg.org/#atomic-http-redirect-handling
423
428
424
-
## Workarounds
429
+
### Workarounds
425
430
426
-
### Network address family autoselection.
431
+
#### Network address family autoselection.
427
432
428
433
If you experience problem when connecting to a remote server that is resolved by your DNS servers to a IPv6 (AAAA record)
429
434
first, there are chances that your local router or ISP might have problem connecting to IPv6 networks. In that case
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4