Hello,
I’ve got a nextjs site where I woudl like to purge cache for single URL, i.e:
mydomaincom
mydomaincom/contact
etc
But sending purge requests like:
curl -X POST ‘api/purge_cache’ -H ‘Authorization: Bearer ‘token’’ -H ‘Content-Type: application/json’ -d ‘{“files”:[“mydomaincom/contact”’]}
doesn’t clear the cache and content on site isn’t refreshed - anyway I’ve got an response:
{“success”:true,“errors”:,“messages”:,“result”:
so the cache should be purged.
Only purge all do the job, but I don’t want to clear all cache for a single URL.
We have an Pro plan on CF if that changes anything. Do I have to include all headers into request, i.e:
x-nextjs-cache: STALE
x-powered-by: Next.js
x-powered-by: PleskLin
?
Trying to do this few days and have no idea what I’m doing wrong.