Skip to content

Commit

Permalink
fix: Cache invalidation api (#26975)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite authored Dec 17, 2024
1 parent 4d92ec3 commit 98bd101
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion posthog/models/remote_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def _purge_cdn(self):
res = requests.post(
settings.REMOTE_CONFIG_CDN_PURGE_ENDPOINT,
headers={"Authorization": f"Bearer {settings.REMOTE_CONFIG_CDN_PURGE_TOKEN}"},
data=data,
json=data,
)

if res.status_code != 200:
Expand Down
2 changes: 1 addition & 1 deletion posthog/models/test/test_remote_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def test_purges_cdn_cache_on_sync(self, mock_post):
mock_post.assert_called_once_with(
"https://api.cloudflare.com/client/v4/zones/MY_ZONE_ID/purge_cache",
headers={"Authorization": "Bearer MY_TOKEN"},
data={
json={
"files": [
{"url": "https://cdn.posthog.com/array/phc_12345/config"},
{"url": "https://cdn.posthog.com/array/phc_12345/config.js"},
Expand Down

0 comments on commit 98bd101

Please sign in to comment.