mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-10-25 02:31:30 +00:00
* web: static-export build + Zoo/Lux brand IAM clientId fixes
Two source-only changes for the Lux/Zoo Cloud console (web/), with no
committed build output.
next.config.ts (SSR -> static export):
- output "standalone" -> "export" + images.unoptimized for Cloudflare Pages.
- Drop headers()/redirects() (unsupported in export); moved to public/_headers
and public/_redirects for Pages. Keep poweredByHeader: false.
Static-export compatibility (no SSR/server runtime):
- layout.tsx: bake brand from NEXT_PUBLIC_BRAND/BRAND; drop force-dynamic +
headers() host detection (client still auto-detects brand from
window.location.hostname via lib/brand.ts).
- app/api/health, app/llms.txt: mark route handlers force-static.
- Remove app/dashboard/api/keys route handler (backend proxy unsupported in
export; dashboard talks to brand.apiUrl directly).
- nodes/[id]: split into server page.tsx (generateStaticParams) + client
node-detail-client.tsx so the dynamic segment is export-compatible.
- unified-navigation.tsx: point API Keys link at the real /dashboard/api-keys
page (the removed route handler is gone).
IAM clientId fixes (real Casdoor apps):
- lux: "lux-app-client-id" -> "lux-cloud".
- zoo: "zoo-app-client-id" -> "zoo-console" (the old value is not a registered
Casdoor client and returns "Invalid client_id", breaking zoo.cloud login).
* web: restore skillsOrg field on BrandConfig (fixes broken export)
The /agents page references brand.skillsOrg at 4 sites, but the field was
dropped from BrandConfig during the consolidate-bootnode merge (it had been
added in 3ef7773). This broke `next build` (output: export) on this branch
AND on main. Restores the field + each brand's GitHub skills org, exactly as
originally introduced.
---------
Co-authored-by: Antje Worring <[email protected]>
Co-authored-by: Hanzo Dev <[email protected]>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import type { NextConfig } from "next"
|
|
|
|
const nextConfig: NextConfig = {
|
|
// Modern React & Next.js features
|
|
reactStrictMode: true,
|
|
poweredByHeader: false,
|
|
|
|
// Static export for Cloudflare Pages (lux.cloud).
|
|
// The app is client-rendered (auth via localStorage, brand auto-detected from
|
|
// window.location.hostname in lib/brand.ts), so a static export serves the full
|
|
// console as static assets on Pages' CDN — no edge/Node server required.
|
|
output: "export",
|
|
devIndicators: false,
|
|
|
|
// Turbopack configuration (required for Next.js 16)
|
|
turbopack: {},
|
|
|
|
// Image optimization is unavailable in static export; serve images as-is.
|
|
images: {
|
|
unoptimized: true,
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "**",
|
|
},
|
|
],
|
|
formats: ['image/avif', 'image/webp']
|
|
},
|
|
|
|
// NOTE: headers() and redirects() are not supported by `output: "export"`.
|
|
// Security headers are applied by Cloudflare Pages via public/_headers, and
|
|
// the legacy /admin -> /dashboard redirect is handled by public/_redirects.
|
|
}
|
|
|
|
export default nextConfig
|