livereload: Fix host comparison when ports aren't present
authorIvan Vyshnevskyi <ivan@vyshnevskyi.com>
Sat, 16 Dec 2017 15:41:52 +0000 (17:41 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 16 Dec 2017 18:06:00 +0000 (19:06 +0100)
commit25114986086e5877a0b4108d8cf5e4e95f377241
treebf2c71b79f55aa092ee916932c8ea6a179860e41
parent9df3736fec164c51d819797416dc263f2869be77
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=80' so both headers do not
contain a port.

Fixes #4141
livereload/livereload.go