Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Correct me if I'm wrong, but couldn't your code just have easily used hostname as opposed to host since that's what you were specifically interested in?


That was, in fact, the bug in the code that brought this to their attention.


That's not exactly what I'm referring to. You could assume behavior would be similar to or equivalent to how window.location.host and window.location.hostname behave. This is especially true when we don't care about ports, as is the case with window.location.hostname.

https://developer.mozilla.org/En/Window.location




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: