Open AnthonyTsang opened 2 years ago
You can take a look at my forks of ipfs-deploy and dnslink-cloudflare. I updated them but as project seems dead (previous PR I did with unpin feature hangs since April) I'm now not caring about backward compatibiliy or tests.
I didn't implement all cases as you could still use "old way" to host ipfs files without using Cloudflare web3 features.
@AnthonyTsang https://github.com/ipfs-shipyard/ipfs-deploy/pull/255
Cloudflare is having a new way to handle dns-link.
Instead of using
PUT zones/:zone_identifier/dns_records/:identifier
like it is an ordinary DNS record, there is a new endpointPATCH zones/:zone_identifier/web3/hostnames/:identifier
My original issue is that, I was trying to run
ipd -p infura -d cloudflare .
withIPFS_DEPLOY_CLOUDFLARE__ZONE
,IPFS_DEPLOY_CLOUDFLARE__RECORD
andIPFS_DEPLOY_CLOUDFLARE__API_TOKEN
are set.The Cloudflare API token has Account : Account Settings : Read Zone : Zone Settings : Edit Zone : Zone : Edit Zone : DNS : Edit
just like https://github.com/ipfs-shipyard/ipfs-deploy/issues/148 said.
But it throws
So I dig into the mentioned line and add
console.log(response.body)
It prints outIt seems that it has to use the new endpoint to do the job.