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
PR #224 introduced a feature where req.hostname get's calculated from the Host header, but it wrongly truncates it to the 2 upper domains.
For example:
example.com will continue being example.com ✅
mercadolibre.com.ar will get truncated to .com.ar ❌
Solution
req.hostname should reflect exactly the same value as the Host header, without the port information if it was included, and all subdomains must be included.
Reference
For reference, here we can see how Express calculates the hostname value.
The text was updated successfully, but these errors were encountered:
Hostname includes full domain name with all the subdomains
If Hostname is predefined, then Host header is ignored (to prevent backwards-incompatible changes)
Fixes#230
Hostname includes full domain name with all the subdomains
If Hostname is predefined, then Host header is ignored (to prevent backwards-incompatible changes)
Fixes#230
Bug
PR #224 introduced a feature where
req.hostname
get's calculated from theHost
header, but it wrongly truncates it to the 2 upper domains.For example:
example.com
will continue beingexample.com
✅mercadolibre.com.ar
will get truncated to.com.ar
❌Solution
req.hostname
should reflect exactly the same value as theHost
header, without the port information if it was included, and all subdomains must be included.Reference
For reference, here we can see how Express calculates the
hostname
value.The text was updated successfully, but these errors were encountered: