Thank you!! I knew Elixir was right (bloody JavaScript…)
Turns our the NJS input of r.headersIn.host contains a HTTP port(!) as well, so it behaves different to what Nginx does for same variable, hence I could not spot the obvious. Ehh.
BTW In Nginx $http_host returns host with port, and $host returns just the host. NJS does not have $http_host, and the $host returns host with port.


















