This is a server side issue.(这是服务器端问题。)
You don't need to add any headers in angular for cors.(您不需要为角色添加角度的任何标题。) You need to add header on the server side:(您需要在服务器端添加标头:)
Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Origin: *
First two answers here: How to enable CORS in AngularJs(前两个答案: 如何在AngularJs中启用CORS) 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…