角被CORS政策阻止

From the client app, I'm trying to do a POST request to an endpoint with api-key attached in header. As a result, I'm getting

Access to XMLHttpRequest at 'https://api.test.com/api/orders' from origin 'http://localhost:4200' has been blocked by CORS policy: Request header field api-key is not allowed by Access-Control-Allow-Headers in preflight response.

经过研究,我发现除非该服务器端点启用了cors起源,否则我将无法获得响应。我是否需要编写一个发送该请求的服务器应用程序,而不是从诸如angular的客户端应用程序发送请求?