bytecodealliance / bytecodealliance/StarlingMonkey
Support a hook for resolving self-requests
- Dominant language
- C
- Stars
- 288
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
StarlingMonkey supports `fetch` calls with relative URLs, same as browsers do. In that case, the URL is resolved using the incoming request's URL as the base. E.g., when processing a request to `https://foo.com/`, the call `fetch("/bar")` will result in an HTTP request to the URL `https://foo.com/bar`.
That isn't always the desired behavior: in [some contexts](https://github.com/spinframework/spin-js-sdk/issues/298), this kind of self-request needs to be made to internal hosts to result in the correct behavior.
To address this, StarlingMonkey should provide a way to hook into the resolution. I think I have an approach in mind that should work well, but will have to think about it a bit more.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.