Support relative url on server side #89285
jim-king-2000
started this conversation in
Ideas
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.
Goals
Support relative url with fetch on server side
/abc//domain.com/abc../abcNon-Goals
No response
Background
We could use
fetch('../abc')in the browser, but have to usefetch('https://domain.com/path')on server side. It makes code complicated.Proposal
On the server side, we could get hostname and path (base url) of the request. Maybe we could provide some way to translate the relative path to the absolute path.
All reactions