Comments (2)
I guess, the workaround can be to explicitly (manually, in the worker code) set x-forwarded-host
header. And a web-server must respect this header....
So, I am not sure my issue is valid. Despite most common reverse proxies' behavior is different: nginx, HAproxy, Traefik - but - Miniflare does not position itself as a reverse proxy, so I'm not sure if is a valuable idea at all
Please close it if you think it's useless.
Thanks!
from miniflare.
Hey! 👋 I think this behaviour is correct. MDN states the Host
header "specifies the host and port of the server to which the request is being sent". If you didn't want to set X-Forwarded-Host
in your worker, you could consider using the outboundService
option...
import { fetch } from "miniflare";
new Miniflare({
outboundService(request) {
const url = new URL(request.url);
if (url.host === "localhost:8443") request.headers.set("X-Forwarded-Host", ...);
return fetch(request);
}
})
from miniflare.
Related Issues (20)
- KV `list` with prefix over 50 chars causes SQL `LIKE or GLOB pattern too complex` error
- Warning with multi-workers typescript HOT 1
- 🐛 BUG: HOT 3
- D1 beta prefix name check HOT 1
- AssertionError thrown while put empty string with KV HOT 3
- How to use kv and D1 in nuxt3?
- `getWorker().fetch` does not preserve origin HOT 1
- Request: Always resolve source maps on Errors HOT 4
- Node 21 vitest-environment-miniflare compatibility HOT 1
- [Miniflare 3] Step debugging with multiple workers HOT 2
- Update undici dependency due to vulnerability HOT 1
- [Docs] Miniflare v2 docs removed? HOT 3
- How to migrate Jest unit tests to Miniflare V3? HOT 1
- Support for typescript. HOT 1
- Is is it possible to collect coverage with vitest-environment-miniflare? HOT 2
- Increase better-sqlite3 compatibility HOT 1
- Uncaught error when initializing two top level WASM modules
- Error: D1_ERROR: Wrong number of parameter bindings for SQL query. HOT 12
- Multiple nodejs_compat packages missing (`crypto`, `path`, etc) HOT 4
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 miniflare.