Access to jupyter notebook with named ip address does not work

I have a remote education server on which I run jupyter notebook and connect to it from my personal laptop. For convenience I always had the IP address of the remote server named in my /etc/hosts file:

127.0.0.1  localhost
1.2.3.4      phd

(1.2.3.4 is an IP address of the remote server). And to connect to my notebook I just typed phd:2399 instead of 1.2.3.4:2399 in my browser. But some time ago it just stopped working. Jupyter notebook starts giving me an error:

[I 11:09:14.617 NotebookApp] Malformed HTTP message from 10.16.112.53: Malformed HTTP version in HTTP Request-Line: ''
[I 11:09:31.778 NotebookApp] Malformed HTTP message from 10.16.112.53: no colon in header line

What happened? It worked perfectly fine before and now it just broke. Can I somehow turn off this “malformed HTTP message” check?