MCPcopy Create free account
hub / github.com/ZingerLittleBee/ServerBee / createDevProxy

Function createDevProxy

apps/web/vite/dev-proxy.ts:55–64  ·  view source on GitHub ↗
(opts: DevProxyOptions)

Source from the content-addressed store, hash-verified

53 * All env validation belongs to the caller (vite.config.ts).
54 */
55export function createDevProxy(opts: DevProxyOptions): ProxyOptions {
56 return {
57 target: opts.target,
58 changeOrigin: true,
59 ws: true,
60 configure: (proxy) => {
61 registerDevProxyHandlers(proxy, opts)
62 }
63 }
64}
65
66export function registerDevProxyHandlers(proxy: DevProxyHookRegistrar, opts: DevProxyOptions) {
67 proxy.on('proxyReq', (proxyReq, req, res) => {

Callers 2

vite.config.tsFile · 0.90
dev-proxy.test.tsFile · 0.90

Calls 1

registerDevProxyHandlersFunction · 0.85

Tested by

no test coverage detected