Update market, account, and onion operations

Capture the current CyberLux UI, commerce, messaging, and Tor ops updates so local main can be pushed to the remote.

Made-with: Cursor
This commit is contained in:
drjones
2026-04-24 23:23:48 -07:00
parent cb072437d0
commit 04d64fb993
44 changed files with 2256 additions and 645 deletions

View File

@@ -6,65 +6,15 @@ import {
type CyberluxEntry,
} from "@/lib/cyberluxEntry";
import { DEDICATED_ROOT } from "@/lib/onionRoutes.generated";
import { isOnionCrossNavPath } from "@/lib/cyberluxCrossNav";
/** Set by nginx per Tor vhost: `proxy_set_header X-Cyberlux-Node <node>;` */
function entryFromRequest(request: NextRequest): CyberluxEntry {
return parseCyberluxEntry(request.headers.get("x-cyberlux-node"));
}
/**
* Paths that must not be prefixed when using a dedicated entry onion.
* Keep in sync with top-level `app/<segment>/` routes.
*/
const CROSS_NAV_PREFIXES = [
"/account",
"/api",
"/arb-academy",
"/awards",
"/barter",
"/chatter",
"/checkout",
"/comparison",
"/conspiracies",
"/darknet-atlas",
"/dashboard",
"/drop-box",
"/drops",
"/easter-eggs",
"/exchange",
"/forum",
"/game",
"/hidden-wiki",
"/inner-circle",
"/links",
"/market",
"/messages",
"/mixer",
"/presswire",
"/raffle",
"/red-room",
"/reviews",
"/sanctuary",
"/search",
"/secret-layer",
"/security-analysis",
"/sign-in",
"/sign-up",
"/support",
"/syndicate",
"/testimonials",
"/trees",
"/trust",
"/vault",
"/vendor",
"/vendors",
"/wallets",
"/webring",
"/w/",
] as const;
function isCrossNavPath(pathname: string): boolean {
return CROSS_NAV_PREFIXES.some((p) => pathname.startsWith(p));
return isOnionCrossNavPath(pathname);
}
function withEntryCookie(res: NextResponse, request: NextRequest): NextResponse {