jakeburden / next-absolute-url

Get the absolute URL of your Next.js app (optionally set a localhost dev URL)
300 stars 30 forks source link

Not returning host with port on client-side #4

Closed relferreira closed 5 years ago

relferreira commented 5 years ago

Hi, I found that using absoluteUrl in the client-side returns the host without the port information. In my case, it is returning localhost, although it should be localhost:3000. I think the solution would be changing window.location.hostname to window.location.host

E.g., image