Automted CDN Cache Purge request failing
Hi All,
To automate CDN cache purge on publish, we implemented a EventHandler which listens to replication request and initiate HTTP Purge request from Author to Publish to clear out CDN cache for published page. However, this Purge request is failing and we are getting 403 response -
Complete Error Response =
<!DOCTYPE html>
<html>
<head>
<title>403 Not allowed.</title>
</head>
<body>
<h1>Error 403 Not allowed.</h1>
<p>Not allowed.</p>
<p>Trace-id: 25477b2d-8605-4fdc-b2e4-a7890b18b998</p>
</body>
</html>
The same EventHandler works in local AEM instance and gives 200 response for Purge request. Implementation is similar like how it is given in this blog - https://experience-aem.blogspot.com/2023/01/aem-cloud-service-invalidate-dispatcher-purge-fastly-cdn-cache-api.html#:~:text=A%20simple%20servlet%20%2Fbin%2Feaem,demand%20for%20a%20page...&text=2)%20Purge%20the%20Page%20in,requested%20from%20the%20support..
JDK Version - 8
AEM cloud
We are passing correct Purge key
Note: Currently, Cloud Program network infrastructure is set to dedicated egress IP.
Any inputs or steps to resolve this issue will be appreciated. Thank you