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

fix: skip undefined proxy entry #9622

Merged
merged 7 commits into from Aug 16, 2022
3 changes: 3 additions & 0 deletions packages/vite/src/node/server/middlewares/proxy.ts
Expand Up @@ -39,6 +39,9 @@ export function proxyMiddleware(

Object.keys(options).forEach((context) => {
let opts = options[context]
if (!opts) {
return
}
if (typeof opts === 'string') {
opts = { target: opts, changeOrigin: true } as ProxyOptions
}
Expand Down