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
If you start node lib/index.js server -l http://*:80 -l https://*:443 the server does not listen on ports 80/443, but on random ports instead.
On this line an URL is created from the listen location, but the ports 80 and 443 are set to an empty string in the URL object if the protocol is http/https:
new URL('http://localhost:80').port === ""
new URL('https://localhost:443').port === ""
Then the check in this line fails and no port is returned from listenArgsForURL which results in a random port.
I think there should be some checks like this:
if(port === '' and protocol === 'http:') port = 80;
if(port === '' and protocol === 'https:') port = 443;
Or am I doing something wrong?
The text was updated successfully, but these errors were encountered:
If you start
node lib/index.js server -l http://*:80 -l https://*:443
the server does not listen on ports 80/443, but on random ports instead.On this line an URL is created from the listen location, but the ports 80 and 443 are set to an empty string in the URL object if the protocol is http/https:
Then the check in this line fails and no port is returned from
listenArgsForURL
which results in a random port.I think there should be some checks like this:
Or am I doing something wrong?
The text was updated successfully, but these errors were encountered: