From 9bbac18b1a73fbe8b4bc9f198892230e69697d79 Mon Sep 17 00:00:00 2001 From: Chaim Date: Sun, 5 Apr 2026 12:18:26 +0000 Subject: [PATCH] fix: send both Espo-Authorization and X-Api-Key for opcache clear The platform stores API keys as base64-encoded Espo-Authorization, not raw API keys. Send both headers so opcache-clear.php can validate. Co-Authored-By: Claude Opus 4.6 (1M context) --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index be31271..39adcbc 100644 --- a/server.py +++ b/server.py @@ -311,7 +311,7 @@ def _clear_opcache(customer, espo_url, api_key): try: oc_req = urllib.request.Request( f'{espo_url}/opcache-clear.php', - headers={'X-Api-Key': api_key}, + headers={'Espo-Authorization': api_key, 'X-Api-Key': api_key}, method='GET', ) oc_resp = urllib.request.urlopen(oc_req, context=SSL_CTX, timeout=10)