Api Rest Enabled CORS problem

I have already solved
The problem was in the client, the Accept header was not being sent correctly and it was not able to receive the Json responses.
I have added the Accept header with the value “application / json” and it works fine.