Comments (3)
CC @lucacasonato, I recall there's a reason for this but I can't recall what's the particular reason.
from deno.
It seems something is missing around here, maybe? Request(input, init)
never references the field.
Lines 395 to 409 in 19c0633
The ObjectKeys(init).length > 0
test suggests someone intended on looking at the init
object for other header-generating fields, but maybe forgot to do so later on.
from deno.
The workaround for now is to use the referer
request header, although it's forbidden even in WinterCG's spec for fetch() (and ignores any referrer policy, so you have to compute it manually):
> await (await fetch(`http://localhost:8000/`, { headers: { referer: `http://localhost:8000/foo` }})).json()
[
[ "accept", "*/*" ],
[ "accept-encoding", "gzip, br" ],
[ "accept-language", "*" ],
[ "host", "localhost:8000" ],
[ "referer", "http://localhost:8000/foo" ],
[ "user-agent", "Deno/1.43.2" ]
]
from deno.
Related Issues (20)
- Import private module from npm registiry HOT 5
- Bug: wrong return value for node `worker_thread.terminate()`
- Deno has panicked when prototype.__defineSetter__ used on built-in objects HOT 4
- Deno has panicked while using `defineProperty` on "Object" HOT 1
- Deno has panicked when `defineProperty` used on Deno "Object" HOT 4
- specs::test::worker_large_output is flaky
- Node compat tests hang for a long time
- internet/test-dns-any.js is flaky
- LSP incorrectly formatted JSDoc in code completions
- error: File name too long (os error 63) HOT 1
- homedir() returns `null` on Amazon Linux 2023
- `geteuid` missing from `node:process`
- Bug: `port.addListener` is not a function HOT 1
- VS Code: "Not prefixed with... and not in import map from ..."
- Run SvelteKit dev server without DENO_FUTURE=1 HOT 1
- `deno serve`: support using the fetch handler as the default export HOT 2
- deno serve should support `--port 0`
- `inspector_profile` integration test is flaky
- Invalid cron schedule
- `Deno.serve`: If there is an error processing the response body the server crashes. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno.