[Error] "Request header field Client-ID is not allowed by Access-Control-Allow-Headers in preflight response."

Why are you setting the Access-Control-Allow-* headers in your ajaxSetup? They’re headers for a server to return, not for a client to send, and it’s likely the cause of your error.