hugo/livereload
satotake 8e2fd55923 livereload: Use X-Forwarded-Host for Codespace
Codespace has 2 types of usage

1. in browser
2. vscode on local computer

As long as you select 2 (on local), Hugo handles livereload expectedly.
But if you use it in browser, Hugo does not reload on file change, as #9936 said.

This issue happens because `CheckOrigin` always fails.
Remote server could rewrite request host name.
Fix this by respecting `X-Forwarded-Host` header during origin checking

After merging this, you can preview changes lively with codespaece in browser.

```sh
hugo server --liveReloadPort 443
```

Close #9936
2022-06-05 11:16:24 +02:00
..
connection.go livereload: Fix data race in close 2017-04-30 01:10:57 +02:00
hub.go livereload: Fix data race in close 2017-04-30 01:10:57 +02:00
livereload.go livereload: Use X-Forwarded-Host for Codespace 2022-06-05 11:16:24 +02:00