I don't know if this solution is correct, because if absolute is false, we should never return the // other host URL. Right now we're not checking for that at all.
In our project, all our routes have null as the host, but absolute is false, so it doesn't matter. Even though we want relative routes, we're getting https://null/etc/etc.
An alternative solution here is to move the isOtherHost check into getCorrectUrl and only check if we are concerned with the host at all, ie. when absolute is true.
I don't know if this solution is correct, because if
absolute
is false, we should never return the//
other host URL. Right now we're not checking for that at all.In our project, all our routes have
null
as the host, butabsolute
is false, so it doesn't matter. Even though we want relative routes, we're gettinghttps://null/etc/etc
.An alternative solution here is to move the
isOtherHost
check intogetCorrectUrl
and only check if we are concerned with the host at all, ie. whenabsolute
is true.