For me this was happening because the request was being redirected to the same url but with a trailing slash. I was making a post request but the redirect configuration was passing it as a get which was not defined.