Axios/XMLHttpRequest is sending GET instead of POST in production environment

后端 未结 3 2076
猫巷女王i
猫巷女王i 2021-01-02 03:22

I am running into a very strange issue. We are putting an app into production and one of the POST request is turning into a POST followed directly by a GET request to the sa

3条回答
  •  臣服心动
    2021-01-02 04:05

    Just for info, I had the same thing - axios request was being redirected. For me though, it turned out to be some localization middleware causing the redirect!

    I set up an alternative route in the Api routes file (again Laravel as in the question), bypassing that middleware (probably where the route should have gone in the first place!). All good now! Schoolboy error I guess!

提交回复
热议问题