You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Using Preact-CLI's issue template as I find it easy to read)
Do you want to request a feature or report a bug?
Likely a bug
What is the current behavior?
Currently Redaxios cannot use relative URLs for its baseURL. The URL() constructor, if passed a base parameter, needs that parameter to be a valid URL on its own, and a relative URL like /api/ is not. MDN Docs.
If the current behaviour is a bug, please provide the steps to reproduce.
Simply open a browser console and write:
new URL('foo', '/api/');
You will get an error stating the following:
Uncaught TypeError: URL constructor: /foo/ is not a valid URL.
If it helps, this PR reproduces the issue: carbon-app/carbon#1054 (just open the "Background Image" menu w/ a debug point set in the redaxios try/catch)
(Using Preact-CLI's issue template as I find it easy to read)
Do you want to request a feature or report a bug?
Likely a bug
What is the current behavior?
Currently Redaxios cannot use relative URLs for its
baseURL
. TheURL()
constructor, if passed abase
parameter, needs that parameter to be a valid URL on its own, and a relative URL like/api/
is not. MDN Docs.If the current behaviour is a bug, please provide the steps to reproduce.
Simply open a browser console and write:
new URL('foo', '/api/');
You will get an error stating the following:
Uncaught TypeError: URL constructor: /foo/ is not a valid URL.
That example is how Redaxios currently forms its URLs when a
baseURL
is suppliedWhat is the expected behaviour?
I'd like to be able to use relative URLs for the base as they're very handy for proxying front-end applications.
The text was updated successfully, but these errors were encountered: