straightforward
straightforward copied to clipboard
TypeError [ERR_INVALID_URL]: Invalid URL
Hi, I started the server and tried to make a simple GET call through the browser. It errors with:
straightforward onUncaughtException: TypeError [ERR_INVALID_URL]: Invalid URL
Relevant place: https://github.com/berstend/straightforward/blob/84a4cb88024cffce37a05870da7d9d0aba7dcca8/src/Straightforward.ts#L295
It's not possible to parse the URL like this. We need to do:
new URL(request.url, `http://${request.headers.host}`);
https://nodejs.org/api/http.html#messageurl
@berstend is it realistic to expect a fix this week, or should I maintain a fork?