diff options
Diffstat (limited to 'livereload')
-rw-r--r-- | livereload/livereload.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/livereload/livereload.go b/livereload/livereload.go index 145cc25ea..246a7393c 100644 --- a/livereload/livereload.go +++ b/livereload/livereload.go @@ -62,7 +62,13 @@ var upgrader = &websocket.Upgrader{ return false } - if u.Host == r.Host { + rHost := r.Host + // For Github codespace in browser #9936 + if forwardedHost := r.Header.Get("X-Forwarded-Host"); forwardedHost != "" { + rHost = forwardedHost + } + + if u.Host == rHost { return true } |