Skip to content

Support a hook for resolving self-requests #221

@tschneidereit

Description

@tschneidereit

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, 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions