-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed as not planned
Labels
Description
Describe the bug
When using the vite proxy every request that goes through it throws
10:46:37 AM [vite] http proxy error:
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20) (x8)
The request succeeds but the console is cluttered by these logs.
In my research, I've seen that this can be an issue with many parts of the equation (nodejs, the api, etc) and I did try to chat in discord but it seems a bit too specific to get any interest. If this isn't a bug in vite, I would appreciate some tips with my configuration or items to check for with the api or nodejs versions. This would be useful information for the docs once solved.
Reproduction
I a using a dotnet core 5 api with the vite configuration of
dotnet new webapi
proxy: {
'/api': {
target: 'https://localhost:5001/',
changeOrigin: true,
secure: false,
protocolRewrite: 'https',
cookieDomainRewrite: 'localhost:3000',
},
},
System Info
System:
OS: macOS 11.5.2
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 853.84 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.8.0 - /usr/local/bin/node
npm: 7.21.0 - /usr/local/bin/npm
Browsers:
Chrome: 92.0.4515.159
Firefox: 90.0.2
Safari: 14.1.2
npmPackages:
vite: ^2.5.1 => 2.5.1
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
JohnCampionJr, maxicarlos08, ghyath5, actuosus and danyloidghyath5 and danyloid