Api_key CORS Error

hello every one , I am new in moqui , when I use /rest/api_key service in server , CORS Error occurred , but I can use it my localhost and it runs without any problem
Error :
Access to XMLHttpRequest at ‘http://----/rest/api_key’ from origin ‘—’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: The ‘Access-Control-Allow-Origin’ header has a value ‘----/’ that is not equal to the supplied origin