'cspNonce' =>
$request->attributes->
get(PlatformRequest::ATTRIBUTE_CSP_NONCE
),
'adminEsEnable' =>
$this->esAdministrationEnabled,
'storefrontEsEnable' =>
$this->esStorefrontEnabled,
]);
} #[Route(path: '/api/_admin/snippets', name: 'api.admin.snippets', methods: ['GET'])]
public function snippets(Request
$request): Response
{ $snippets =
[];
$locale =
$request->query->
get('locale', 'en-GB'
);
$snippets[$locale] =
$this->snippetFinder->
findSnippets((string) $locale);
if ($locale !== 'en-GB'
) { $snippets['en-GB'
] =
$this->snippetFinder->
findSnippets('en-GB'
);
} return new JsonResponse($snippets);
} #[Route(path: '/api/_admin/known-ips', name: 'api.admin.known-ips', methods: ['GET'])]
public function knownIps(Request
$request): Response
{