-
Notifications
You must be signed in to change notification settings - Fork 2.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
Use REMIX_DEV_ORIGIN
for the live reload hostname
#6923
Conversation
🦋 Changeset detectedLatest commit: 22def62 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@huw can you locally rebase your branch onto |
@pcattori Done! Cheers ^_^ |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Discussed with @pcattori on Discord.
For live reloading, we currently use the protocol and port from the
REMIX_DEV_ORIGIN
variable, but use the hostname fromwindow.location
. This PR also uses the hostname fromREMIX_DEV_ORIGIN
(when provided).This also means that we can support use cases where the development server is on a different hostname from the static assets. This is the case, for example, with GitHub Codespaces, which proxies separate ports through HTTPS on different subdomains. For example:
https://<CODESPACE_NAME>-3000.app.github.dev
for the static assetshttps://<CODESPACE_NAME>-3001.app.github.dev
for the websocket(If for whatever reason you’re a Codespaces user seeing this, I set
REMIX_DEV_ORIGIN
tohttps://${process.env.CODESPACE_NAME}-3001.${process.env.GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN]}
when I launch the development server)