-
Notifications
You must be signed in to change notification settings - Fork 65
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
(Nuxt 3.7) Dev websocket (hmr) not working when using local https #112
Comments
Thanks for making a detailed issue. Websocket itself is not working ATM. I have linked it to main tracker #108 |
It should be resolved in You can confirm with |
@pi0 Can confirm https local hmr works again <3 ! |
@pi0 I tried the edge channel as per nuxt/nuxt#14937 (comment) but I'm still getting this issue. I'm using ssl key and cert like in the issue description. This has not been an issue in ~3.6. vite: {
server: {
hmr: {
protocol: 'ws',
host: 'localhost'
}
},
} |
@nandi95 Can you please try with latest 3.7.3? If still broken, feel free to open a new issue so i can investigate 👍🏼 |
on nuxt edge channel fixed in 3.7.1-28223216.aa0ea8bf |
Summary:
Websocket connection fails with security errors when running Nuxt 3.7.0 with HTTPS enabled.
Steps to Reproduce:
mkcert
to create cert to enable HTTPS locally for development.Expected Behavior:
Both HTTPS and Websocket connections should work without issues.
Actual Behavior:
While HTTPS works as expected, the Websocket connection fails with the following errors:
Mixed Content: The page at 'https://local.domain.nl:3000/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://local.domain.nl:24678/_nuxt/'. This request has been blocked; this endpoint must be available over WSS.
client.ts:69 [vite] failed to connect to websocket (SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.).
Example
package.json
Configuration:Environment Information:
Related
#107
#108
The text was updated successfully, but these errors were encountered: