Files
asowneryt 19dcce5d59
Docker / build (push) Successful in 1m35s
Chatwoot, Arcane deployment
2026-07-18 00:40:53 +12:00

13 lines
522 B
TypeScript

import { NextResponse } from 'next/server'
// Force runtime evaluation so the token is read from the container's
// environment on each request instead of being frozen at build time.
// This lets Docker compose supply CHATWOOT_TOKEN via env_file.
export const dynamic = 'force-dynamic'
export async function GET() {
// Chatwoot website tokens are public by design (they ship in the widget),
// so exposing it through this endpoint is safe.
return NextResponse.json({ token: process.env.CHATWOOT_TOKEN ?? null })
}