I have a webpack with proxy as below. All GET requests work OK, but when I try to POST to API I can see in the browser 2 requests. First one seems to be a POST with 301 as status and next one is a GET request. Most probably there are 2 requests because of CORS, but I need both requests to be POST requests not GET.
I need to send data through POST, but webpack seems to change request method to GET.
proxy: {
'/api': {
target: 'http://127.0.0.4/dist',
secure: false,
changeOrigin: true,
}
},