Skip to content

Commit 934a304

Browse files
authoredNov 21, 2022
chore: proxy bypass do nothing with object result (#10209)
1 parent 0e271ff commit 934a304

File tree

1 file changed

+1
-5
lines changed
  • packages/vite/src/node/server/middlewares

1 file changed

+1
-5
lines changed
 

‎packages/vite/src/node/server/middlewares/proxy.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { Connect } from 'dep-types/connect'
55
import type { HttpProxy } from 'dep-types/http-proxy'
66
import colors from 'picocolors'
77
import { HMR_HEADER } from '../ws'
8-
import { createDebugger, isObject } from '../../utils'
8+
import { createDebugger } from '../../utils'
99
import type { CommonServerOptions, ResolvedConfig } from '../..'
1010

1111
const debug = createDebugger('vite:proxy')
@@ -121,10 +121,6 @@ export function proxyMiddleware(
121121
req.url = bypassResult
122122
debug(`bypass: ${req.url} -> ${bypassResult}`)
123123
return next()
124-
} else if (isObject(bypassResult)) {
125-
Object.assign(options, bypassResult)
126-
debug(`bypass: ${req.url} use modified options: %O`, options)
127-
return next()
128124
} else if (bypassResult === false) {
129125
debug(`bypass: ${req.url} -> 404`)
130126
return res.end(404)

0 commit comments

Comments
 (0)
Please sign in to comment.