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) <noreply@anthropic.com>
This commit is contained in:
@@ -311,7 +311,7 @@ def _clear_opcache(customer, espo_url, api_key):
|
|||||||
try:
|
try:
|
||||||
oc_req = urllib.request.Request(
|
oc_req = urllib.request.Request(
|
||||||
f'{espo_url}/opcache-clear.php',
|
f'{espo_url}/opcache-clear.php',
|
||||||
headers={'X-Api-Key': api_key},
|
headers={'Espo-Authorization': api_key, 'X-Api-Key': api_key},
|
||||||
method='GET',
|
method='GET',
|
||||||
)
|
)
|
||||||
oc_resp = urllib.request.urlopen(oc_req, context=SSL_CTX, timeout=10)
|
oc_resp = urllib.request.urlopen(oc_req, context=SSL_CTX, timeout=10)
|
||||||
|
|||||||
Reference in New Issue
Block a user