T
TanStack7mo ago
fascinating-indigo

running under https on localhost [solved]

Hello I'm trying to run tanstack start in development using https and a custom domain name (eg local.example.app:8080) i managed to get it running (using vinxi --host, setting up an env variable HOST=local.example.app and generating self signed certificates and using them) im having an issues related to hmr as it does not seem to work (the websocket connection fails) i couldnt find any documentation on this is there any way to have tanstack start run in this configuration? edit: everything works fine if im using https using https://localhost its just when adding the configuration for the host i see the issue
9 Replies
extended-salmon
extended-salmon6mo ago
Any screenshots or sources?
fascinating-indigo
fascinating-indigoOP6mo ago
this happens by just following the guide in the getting started documentation or cloning any of the starter examples then adding https: true in the server option in app.config.ts a HOST=custom.host.com env variable and then running vinxi dev --host --port 8080
No description
fascinating-indigo
fascinating-indigoOP6mo ago
i managed to fix it by adding allowed hosts under the vite config but i dont think this is the correct way as that prop has been omitted intentionaly
No description
adverse-sapphire
adverse-sapphire6mo ago
on the alpha version you can just use this in a standard vite config
fascinating-indigo
fascinating-indigoOP6mo ago
you mean just create a normal vite config file and remove the vite part from app config?
adverse-sapphire
adverse-sapphire6mo ago
GitHub
Start BETA - Tracking · TanStack router · Discussion #2863
Tracking any important changes for TanStack Start during the BETA period. If you are coming from the ALPHA of TanStack Start, you can see all the breaking changes that were made here - #2403
fascinating-indigo
fascinating-indigoOP6mo ago
thanks!
fascinating-indigo
fascinating-indigoOP6mo ago
in case anyone stumbles into this it does work with the latest alpha but only if one sets the proxy setting to an empty object eg: proxy: {} (without that vite throws an error)
No description
No description
fascinating-indigo
fascinating-indigoOP6mo ago
thank you @Manuel Schiller

Did you find this page helpful?