Error 405 on Strapi request

I just tried Strapi v4, for authenticate user route should be /api/auth/local

let headersList = {
 "Accept": "*/*",
 "Content-Type": "application/json"
}

fetch("http://localhost:1337/api/auth/local", { 
  method: "POST",
  body: "{\n  \"identifier\": \"usern@email.com\",\n  \"password\": \"user123\"\n}",
  headers: headersList
}).then(function(response) {
  return response.text();
}).then(function(data) {
  console.log(data);
})

I realized the correct route on this setting user permission role
Bound route to auth.register

11 Likes