diff --git a/packages/@vue/cli-service/lib/util/prepareProxy.js b/packages/@vue/cli-service/lib/util/prepareProxy.js index 3ea91ee7cf..d0d1ffef31 100644 --- a/packages/@vue/cli-service/lib/util/prepareProxy.js +++ b/packages/@vue/cli-service/lib/util/prepareProxy.js @@ -79,9 +79,9 @@ module.exports = function prepareProxy (proxy, appPublicFolder) { ) } }, - onProxyReq (proxyReq) { + onProxyReq (proxyReq, req, res) { if (usersOnProxyReq) { - usersOnProxyReq(proxyReq) + usersOnProxyReq(proxyReq, req, res) } // Browsers may send Origin headers even with same-origin // requests. To prevent CORS issues, we have to change