-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LiveReload doesn't work in GitHub Codespace #9936
Comments
Hmm... I'm pretty sure I have been using in similar settings before ... But "someone" may have broken it. |
Never mind, I see it now (at least what the plan was).
Let me know if that works for you. |
that doesn't work either, here is the repository I'm using: https://github.com/ideacrew/sbm-docs here are the options I've tried and the errors that I'm getting in the console
|
OK, I don't understand the GitHub Codespaces good enough to tell what/why. |
Yeah, I guess there's some similarities with a technology called GitPod where folks have found a similar issue but have resolved it with It's entirely possible that:
In either case, I don't think enough people use codespaces (yet!) for this to matter much thanks for the time you've already put in -- maybe someone else will find this issue and come up with solution |
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 gohugoio#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 gohugoio#9936
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
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
General Problem description
LiveReload doesn't seem to work in GitHub Codespaces. This seems to be due to the port being appended to the url even when
--appendPort=false
is passed to the cliThe text was updated successfully, but these errors were encountered: