Cors Problem 405 Error


I am facing some difficulties in implementing CORS in my application. I am using this solution ( and as expected the OPTIONS request responds with all the * attributes, however when the second request arrives on the actual endpoint method it receives a 405, previously OPTIONS releases all the methods. can anybody help me?