I have created a private IPFS network. In that network, I have enabled the below configuration to avoid CORS.
ipfs config --json API.HTTPHeaders.Access-Control-Al