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

[vite] connecting... in https #6040

Closed
7 tasks done
blakeyi opened this issue Dec 9, 2021 · 4 comments
Closed
7 tasks done

[vite] connecting... in https #6040

blakeyi opened this issue Dec 9, 2021 · 4 comments

Comments

@blakeyi
Copy link

blakeyi commented Dec 9, 2021

Describe the bug

its normal when i deploy my webapp in http mode, but when deploy it in https mode,it begin to repeated connecting every five seconds and always refesh even with the hmr setting. it also doest work in wss
here is my website infos:
1.website: https://blakeyi.cn/
2.code: https://github.com/blakeyi/blog-vue-typescript
3.vite.config.ts
image

Reproduction

visit https://blakeyi.cn/
image

System Info

centos7
chrome

Used Package Manager

npm

Logs

No response

Validations

@ygj6
Copy link
Member

ygj6 commented Dec 10, 2021

Works fine in dev locally, set server.https = true and server.hmr.protocal = 'wss', hope it helps you :)

@blakeyi
Copy link
Author

blakeyi commented Dec 11, 2021

Works fine in dev locally, set server.https = true and server.hmr.protocal = 'wss', hope it helps you :)
it still doesnt work,thanks a lot for your reply

@ygj6
Copy link
Member

ygj6 commented Dec 21, 2021

How about set server.hmr.host = 443 ? FYI, #4259 (comment)

@blakeyi
Copy link
Author

blakeyi commented Dec 29, 2021

ok, it work by the follow setting, thanks a lot,i wondering what‘s the role of ’strictPort, and why need to set hmr.port = 443
server: {
host: "0.0.0.0",
port: 3000,
strictPort: true, // needed
hmr: {
port: 443, // needed
},
},

@blakeyi blakeyi closed this as completed Jan 9, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants