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

Simultaneously serve both plaintext (e.g., http://192.168.1.100:5173) and ssl (e.g., https://192.168.1.100:5173) #63

Closed
wbudd opened this issue Feb 3, 2025 · 1 comment

Comments

@wbudd
Copy link

wbudd commented Feb 3, 2025

Currently, there doesn't seems to be a straightforward way to toggle between encrypted and unencrypted dev server hosting, short of commenting lines in/out at vite.config.js/ts.

But it seem to me the pain-free solution would be to simply serve both at the same time (by default even?): allow visiting encrypted https:// URLs while preserving their original unencrypted http:// URL variants.

Rationale: recent browsers (in particular: Chrome since half a year ago or so) make it ridiculously hard to specify a whitelist exception to not allowing self-signed/dummy certificates. Making it easier to fallback to unencrypted HTTP when testing such browsers makes dev life a little less painful.

@bluwy
Copy link
Member

bluwy commented Feb 25, 2025

Handling both http and https would involve two servers and would have to be supported from Vite itself (if the feature is accepted). I don't think there's much we can do from the plugin itself to address this. Maybe you can follow vitejs/vite#16350 which has a similar topic.

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants