Troubleshooting
No colors in the console
ts
process.env.NO_COLOR = undefined;
process.env.FORCE_COLOR = "1";
createProxyPlugin({
logger: {
colorful: false // set to false if you actually want to disable colors
}
});Proxy not working
- Make sure
enabledistrue. - If
devOnly: true, ensure you are runningvite dev. - Check that
envmatches an entry intargets. - Verify the upstream server is reachable (curl it, inspect packets, etc.).
Too many logs
ts
createProxyPlugin({
logger: {
level: LogLevel.ERROR
},
requestFilter: (url) => url.includes("/critical/api/"),
responseFilter: (_, __, status) => status >= 500
});Verbose logs impacting performance
- Set
leveltoINFOorWARN. - Use
maxBodyLength,maxWsMessageLength,maxSseMessageLength. - Enable
devOnly: truefor production builds.
ts
createProxyPlugin({
logger: {
level: LogLevel.ERROR,
colorful: false,
showRequestHeaders: false,
showRequestBody: false,
showResponseHeaders: false,
showResponseBody: false
},
devOnly: true
});No WebSocket / SSE logs
Check that:
- The
webSocket/sseblocks are enabled for the target. logger.showWsMessages/showSseMessagesaretrue.webSocketFilteris not filtering out the path.
Still stuck?
- See the API reference for every method.
- Open an issue on GitHub: https://github.com/22wink/vite-enhanced-proxy/issues