Skip to content
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

Merged
merged 3 commits into from Jul 23, 2023
Merged

Use REMIX_DEV_ORIGIN for the live reload hostname #6923

merged 3 commits into from Jul 23, 2023

Conversation

huw
Copy link
Contributor

@huw huw commented Jul 21, 2023

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 from window.location. This PR also uses the hostname from REMIX_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 assets
  • https://<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 to https://${process.env.CODESPACE_NAME}-3001.${process.env.GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN]} when I launch the development server)

@changeset-bot
Copy link

changeset-bot bot commented Jul 21, 2023

🦋 Changeset detected

Latest commit: 22def62

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@remix-run/react Patch
@remix-run/testing Patch
create-remix Patch
remix Patch
@remix-run/architect Patch
@remix-run/cloudflare Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
@remix-run/css-bundle Patch
@remix-run/deno Patch
@remix-run/dev Patch
@remix-run/eslint-config Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/node Patch
@remix-run/serve Patch
@remix-run/server-runtime Patch
@remix-run/vercel Patch

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 huw changed the base branch from main to dev July 21, 2023 17:01
@huw huw changed the base branch from dev to main July 21, 2023 17:09
@pcattori pcattori changed the base branch from main to dev July 21, 2023 18:20
@pcattori pcattori changed the base branch from dev to main July 21, 2023 18:20
@pcattori
Copy link
Contributor

@huw can you locally rebase your branch onto dev and the force push that onto here? this needs to target dev not main since its a code change (not just docs or templates changes).

@huw huw changed the base branch from main to dev July 22, 2023 10:44
@huw
Copy link
Contributor Author

huw commented Jul 22, 2023

@pcattori Done! Cheers ^_^

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented Jul 22, 2023

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@pcattori pcattori merged commit 9eeef33 into remix-run:dev Jul 23, 2023
9 checks passed
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-9eeef33-20230723 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-3b808ce-20230802 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

🤖 Hello there,

We just published version 1.19.2-pre.1 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-7cb1e7e-20230803 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

🤖 Hello there,

We just published version 1.19.2-pre.2 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-6e250f7-20230805 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-b1149bb-20230810 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants