T
TanStack4mo ago
extended-salmon

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
ratty-blush
ratty-blush4mo ago
Any screenshots or sources?
extended-salmon
extended-salmonOP4mo 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
extended-salmon
extended-salmonOP4mo 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
rare-sapphire
rare-sapphire4mo ago
on the alpha version you can just use this in a standard vite config
extended-salmon
extended-salmonOP4mo ago
you mean just create a normal vite config file and remove the vite part from app config?
rare-sapphire
rare-sapphire4mo 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
extended-salmon
extended-salmonOP4mo ago
thanks!
extended-salmon
extended-salmonOP4mo 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
extended-salmon
extended-salmonOP4mo ago
thank you @Manuel Schiller

Did you find this page helpful?