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

Confused about using http/1 when server.proxy is used #14022

Closed
1 of 4 tasks
hai-x opened this issue Aug 5, 2023 · 5 comments
Closed
1 of 4 tasks

Confused about using http/1 when server.proxy is used #14022

hai-x opened this issue Aug 5, 2023 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@hai-x
Copy link
Contributor

hai-x commented Aug 5, 2023

Documentation is

  • Missing
  • Outdated
  • Confusing
  • Not sure?

Explain in Detail

Enable TLS + HTTP/2. Note this downgrades to TLS only when the server.proxy option is also used.
from https://vitejs.dev/config/server-options.html#server-https

From code

if (proxy) {

As shown in the title, I am confused about using http/1 when server.proxy is used and why can't use http/2.

Your Suggestion for Changes

Use http/2 when server.proxy is used

Reproduction

No response

Steps to reproduce

No response

@hai-x hai-x added the documentation Improvements or additions to documentation label Aug 5, 2023
@sapphi-red
Copy link
Member

It's because http-proxy doesn't support http2.

@hai-x
Copy link
Contributor Author

hai-x commented Aug 17, 2023

It's because http-proxy doesn't support http2.

Thank you. I just found related issue #484. Is there any approach? such as using http2-proxy when proxy is used.

@sapphi-red
Copy link
Member

See #7611 (reply in thread)

@hai-x
Copy link
Contributor Author

hai-x commented Aug 17, 2023

See #7611 (reply in thread)

Thank you for your guidance, I will try to use existing vite plugin or create one new plugin that match my own.

@sapphi-red sapphi-red removed documentation Improvements or additions to documentation contribution welcome labels Aug 19, 2023
@sapphi-red
Copy link
Member

I'll close this issue as a duplicate of #4184.

@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Aug 19, 2023
@sapphi-red sapphi-red added the duplicate This issue or pull request already exists label Aug 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants