use resource name in ssh/rdp/vnc page meta

This commit is contained in:
miloschwartz
2026-06-04 16:45:22 -07:00
parent 9d3f96cf83
commit 889f78ddb8
7 changed files with 92 additions and 94 deletions

View File

@@ -0,0 +1,13 @@
import { getBrowserTargetForRequest } from "@app/lib/getBrowserTargetForRequest";
import type { Metadata } from "next";
export async function generateBrowserGatewayMetadata(
protocol: "SSH" | "RDP" | "VNC"
): Promise<Metadata> {
const { target } = await getBrowserTargetForRequest();
return {
title: target?.name
? `${protocol} - ${target.name}`
: `${protocol} - Pangolin`
};
}