This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Commit d99015a
committed
Specifically, remove `Accept`, `Accept-Language`, `Sec-Fetch-Mode`
and `User-Agent`, unless they are explicitly added by the user.
`User-Agent` is particularly important to remove as many APIs (e.g.
GitHub), require it to be set, meaning code was working locally but
not when deployed.
The implementation of this relies on some internal `undici` exports.
We were already using some internal symbols for accessing hidden
`Request`/`Response` state, so this isn't too bad. The version of
`undici` is now pinned to an exact version though, so if internal
changes are made, they shouldn't affect end-users. We'll have to
explicitly upgrade and run our tests again.
1 parent 1bf7600 commit d99015a
File tree
10 files changed
+197
-59
lines changed- packages
- cache
- core
- src/standards
- test/standards
- durable-objects
- html-rewriter
- http-server
- miniflare
- web-sockets
10 files changed
+197
-59
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments