Replies: 1 comment 3 replies
-
The actual Remix dev server is at By default function remixLiveReloadConnect(config) {
let REMIX_DEV_ORIGIN = ${JSON.stringify(process.env.REMIX_DEV_ORIGIN)};
let protocol =
REMIX_DEV_ORIGIN ? new URL(REMIX_DEV_ORIGIN).protocol.replace(/^http/, "ws") :
location.protocol === "https:" ? "wss:" : "ws:"; // remove in v2?
let hostname = REMIX_DEV_ORIGIN ? new URL(REMIX_DEV_ORIGIN).hostname : location.hostname;
let url = new URL(protocol + "//" + hostname + "/socket");
url.port =
${port} ||
(REMIX_DEV_ORIGIN ? new URL(REMIX_DEV_ORIGIN).port : 8002); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Ok, so we have a reverse proxy in development that terminates TLS (
https://my-remix.dev
). However, from node, the remix dev server is only available on localhost (http://localhost:3001
).It is a little bit tricky with the available knobs (
port
&REMIX_DEV_ORIGIN
) to connect this up (without going the custom server route).What worked on v1 is to set a remix dev port (
3001
). For example:https://my-remix.dev:3001
(the host is inferred here)http://localhost:3001
This no longer works in v2 as the socket is
ws://my-remix.dev:3001
(notwss://
). I'm not sure if that should be considered a bug though - not a common configuration I'm sure 😛If anyone has a simple solution would appreciate it, thanks!
Beta Was this translation helpful? Give feedback.
All reactions