CORS not working with route : <p>I have an issue with an endpoint on my web api. I have a POST method that is not working due to:</p>

<blockquote>
  <p>Response to preflight request doesn't pass access control check: No
  'Access-Control-Allow-Origin' header is present on the requested
  resource. Origin '<a href="http://localhost:3000">http://localhost:3000</a>' is therefore not allowed
  access. The response had HTTP status code 405.</p>
</blockquote>

<p>I cannot see why that is not working since I have plenty of methods that are working indeed with the same COSR configuration. The only difference is that this method has a specified route, as you can see below:</p>

<pre><code>// POST: api/Clave
        [EnableCors(origins: "*", headers: "*", methods: "*", SupportsCredentials = true)]
        [Route("{id:int}/clave")]
        [HttpPost]
        public HttpResponseMessage Post(int id, [FromBody]CambioClaveParameters parametros)
        {
            UsuarioModel usuario = SQL.GetUsuario(id);

            if (Hash.CreateMD5(parametros.ViejaClave) != usuario.Clave.ToUpper())
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }
            else if (Hash.CreateMD5(parametros.ViejaClave) == usuario.Clave.ToUpper())
            {
                SQL.ModificarClaveUsuario(id, Hash.CreateMD5(parametros.NuevaClave));

                return Request.CreateResponse(HttpStatusCode.OK);
            }
            else
            {
                return Request.CreateResponse(HttpStatusCode.InternalServerError);
            }
        }
</code></pre>

<p>Any Ideas of why this is happening?.</p>

<p>Thanks!.</p>
