-
-
Notifications
You must be signed in to change notification settings - Fork 436
Open
Description
I'm having a problem with prefixUrl option:
const ky = Ky.extend({
prefixUrl: API_BASE_URL,
});
Our backend API is returning absolute download paths which already include the base url. In those cases we end up with request urls having prefixed twice with the base url.
Could we have prefixUrl option's behavior altered so that it checks if the url already starts with this value, and if so it would not prefix it there?
I tried to create a beforeRequest hook to modify request.url, but it seems the hook cannot modify that property. That approach would have averted having to check and modify urls in possibly multiple parts of the codebase.
kleinfreund
Metadata
Metadata
Assignees
Labels
No labels