Repository navigation
Make getPlatformProxy respect dev.port of wrangler.toml
#16198
BastiDood
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
getPlatformProxycurrently ignores thedev.portconfiguration inwrangler.tomlwhen initializing its local emulator.In my specific case, SvelteKit needs a known local S3 endpoint so Vite can proxy browser multipart uploads to the same R2 emulator used by the native bindings. This is currently impossible through its public API as
getPlatformProxydoesn't yet expose some sort of alocalAddressfield or a configurable fixed address to which I can make S3 requests.I propose that
getPlatformProxyshould respectdev.portinwrangler.toml. If not provided, the existing automatic port allocation behavior takes over.1Note
An alternative is to expose
hostname+portoptions inGetPlatformProxyOptions, but I thinkdev.portis minimally sufficient for my use case.Footnotes
I have a one-line
pnpmpatch in my projects to prove the concept. If this proposal is accepted, I can submit the PR that simply addsport: config2.dev.porttogetMiniflareOptionsFromConfig. ↩All reactions