hostname instate of host ?
anolek opened this issue · 1 comments
anolek commented
"version": "0.0.9"
Hi, first of all, thanks for your module ! And sorry for my bad english.
When i do something with an url like "mega.co.nz:443/#hash!hash" (i need to use :port in url for some reasons), it says "Wrong URL Supplied".
It is because in /lib/mega.js near line 19, you use ".host" instate of ".hostname"
// "mega.co.nz:443" !== "mega.co.nz"
if (url.host !== 'mega.co.nz' || !url.hash
But if we do
// "mega.co.nz" !== "mega.co.nz"
if (url.hostname !== 'mega.co.nz' || !url.hash
It works :)
tonistiigi commented
Thanks for reporting. Should be fixed now.