This currently throws a TypeError if config.baseUrl is not an absolute URL here. There has been an ongoing debate on adding support for relative URLs to the URL class. My current setup has to work with relative URLs as it's a backing server to multiple domains. It will be great to provide a flexible way to build the final URL.
A suggestion would be to support a url builder function in the config, for example:
This currently throws a
TypeError
ifconfig.baseUrl
is not an absolute URL here. There has been an ongoing debate on adding support for relative URLs to the URL class. My current setup has to work with relative URLs as it's a backing server to multiple domains. It will be great to provide a flexible way to build the final URL.A suggestion would be to support a url builder function in the config, for example:
To work around this, I provide a placeholder url in the config and replace it after imgproxy url generation. It works great with relative urls: