diff --git a/livereload/livereload.go b/livereload/livereload.go
index <HASH>..<HASH> 100644
--- a/livereload/livereload.go
+++ b/livereload/livereload.go
@@ -62,6 +62,10 @@ var upgrader = &websocket.Upgrader{
 			return false
 		}
 
+		if u.Host == r.Host {
+			return true
+		}
+
 		h1, _, err := net.SplitHostPort(u.Host)
 		if err != nil {
 			return false
livereload: Fix host comparison when ports aren't present

Compare the original hosts from 'Origin' and 'Host' headers before
attempting to do a port-less comparison.  This helps in the case when
hugo server was started with a '--port=<I>' so both headers do not
contain a port.

Fixes #<I>