Update community IDs, enhance CaptchaController caching, and modify home template for Altcha integration

- Changed community IDs for various components in graph.json to reflect updated associations.
- Added Cache-Control headers to the challenge and config methods in CaptchaController to prevent caching by CDNs and proxies.
- Updated the Altcha widget in home.html.twig to include a language attribute for better localization.
- Added a new AST cache file for CaptchaController to improve performance.
- Updated manifest.json with new modification times and AST hashes for several files.
This commit is contained in:
hamed
2026-07-10 11:57:16 +03:30
parent ec184dfcc8
commit 3eee6c3886
11 changed files with 111 additions and 116 deletions
+11 -2
View File
@@ -20,7 +20,13 @@ class CaptchaController extends BaseController
#[Route('/api/v1/altcha/challenge', methods: ['GET'])]
public function challenge(): JsonResponse
{
return new JsonResponse($this->altcha->createChallenge());
// هر challenge باید یکتا و تازه باشد؛ کش‌شدن توسط CDN/پراکسی (مثل ArvanCloud)
// هم چلنج را بین کاربران مشترک می‌کند (شکستن one-time) و هم ممکن است صفحه‌ی
// HTML کش‌شده برگرداند. با no-store کش کاملاً غیرفعال می‌شود.
$response = new JsonResponse($this->altcha->createChallenge());
$response->headers->set('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0');
return $response;
}
#[OA\Get(
@@ -31,6 +37,9 @@ class CaptchaController extends BaseController
#[Route('/api/v1/altcha/config', methods: ['GET'])]
public function config(): JsonResponse
{
return new JsonResponse(['enabled' => $this->altcha->enabled()]);
$response = new JsonResponse(['enabled' => $this->altcha->enabled()]);
$response->headers->set('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0');
return $response;
}
}