mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat(antilopay): inject apay-tag meta on cabinet boot
Pairs with the bedolaga-bot commit that exposes
GET /cabinet/public/site-verification (JSON: { apay_tag: string | null }).
New useSiteVerification hook fires once on App mount, fetches the
configured tag value, and upserts <meta name='apay-tag' content='...'>
into document.head. When the bot returns null we proactively remove
any previously-rendered tag so toggling the env var off cleans up the
page.
Failure modes are silent — verification is best-effort and must
never block the cabinet from rendering. No admin UI field is needed:
the value lives in the bot's .env (ANTILOPAY_APAY_VERIFICATION_TAG),
matching how all other Antilopay credentials are configured.
This commit is contained in:
@@ -32,6 +32,7 @@ import { ErrorBoundary } from './components/ErrorBoundary';
|
||||
import { PermissionRoute } from '@/components/auth/PermissionRoute';
|
||||
import { saveReturnUrl } from './utils/token';
|
||||
import { useAnalyticsCounters } from './hooks/useAnalyticsCounters';
|
||||
import { useSiteVerification } from './hooks/useSiteVerification';
|
||||
// Auth pages - load immediately (small)
|
||||
import Login from './pages/Login';
|
||||
import TelegramCallback from './pages/TelegramCallback';
|
||||
@@ -229,6 +230,9 @@ function LegacySubscriptionRedirect() {
|
||||
|
||||
function App() {
|
||||
useAnalyticsCounters();
|
||||
// Pulls site-verification tokens (Antilopay apay-tag etc.) from the bot
|
||||
// backend and injects matching <meta> tags into document.head.
|
||||
useSiteVerification();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user