-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
when using --https, proxy gives TypeError [ERR_INVALID_HTTP_TOKEN]: Header name must be a valid HTTP token [":path"] #484
Comments
http-proxy (The underlying module which vite uses for proxy) does not support http2. You cannot use https with proxy as
|
Thanks, Would prefer to avoid 1. in order to catch issues with https that might reach production, eg a non-secure resource which will be blocked by browser when using https. |
@ashubham I think option 3 seems most straightforward for now. Open to a PR. |
Is it possible to use http2 in |
seems that this module would work ? @mariusa |
Describe the bug
package.json
vite.config.js
Accessing
https://localhost:3000/api/test
givesIf
--https
is removed, then the proxy works.Note that the proxy is to
http
, guess it's not an issue (works fine with vue-cli vue.config.js)Reproduction
Please provide a link to a repo that can reproduce the problem you ran into.
Hope it's not needed? It requires a node server running on http://localhost:5000
System Info
vite
version: vite v1.0.0-beta.8Logs (Optional if provided reproduction)
vite
orvite build
with the--debug
flag.The text was updated successfully, but these errors were encountered: