webpack-dev-server proxy doesnt work

تعرفه تبلیغات در سایت

آرشیو مطالب

امکانات وب

Vote count: 0

Here is the part of my webpack config:

devServer: {
port: 4200,
historyApiFallback: true,
proxy: {
  "/file/**": {
    "target": proxyFileUri,
    "changeOrigin": true,
    "pathRewrite": {"^/file" : ""},
    "secure": false
  },
  "/api/**": {
    "target": proxyApiUri,
    "changeOrigin": true,
    "secure": false
  }
}

},

While trying to proxy all requests by webpack-dev-serv somthing went wrong. What is the problem? I can not understand why the proxy does not work on the key "/file", path doesnt rewrite, i can't find a solution. Could the problem be that I'm sending a request with "Content-type : multipart form data"?

asked 9 secs ago

نویسنده : استخدام کار بازدید : 67 تاريخ : جمعه 29 ارديبهشت 1396 ساعت: 16:41
برچسب‌ها :

خبرنامه

عضویت

نام کاربري :
رمز عبور :