vite
vite copied to clipboard
Support HTTP2 and Proxy at the same time?
Clear and concise description of the problem
Hi there, is there any way that I can turn on the https
and proxy
options on vite.config.js at the same time ? Because I want to use http2 and proxy...
Because as what vite officially in the document states that if the proxy
option is on, then it will downgrade and TSL
only, which mean it will lose http2
function..
Suggested solution
as I have tried some ways, but it all seem fails....
use http-proxy-middleware
and create a middleware proxy,using the configreServer
API that vite provide, then I could turn on https
option in vite.config.js
, but it seems that it wouldn't work, because I am facing this error....
https://github.com/http-party/node-http-proxy/issues/1237
Highly appreciated if there is a workaround...
Alternative
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.