sh2/d2ypp2/web-console/next.config.mjs
eric 9888f1daad Harden YouTube unmanned live stack and hide advanced console panels.
Fix Pro config SSOT, event FSM, FFmpeg error tiers, relay heartbeat, and ingest auth while keeping relay snapshot, quality guard, and event hub hidden in the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 06:31:31 -05:00

52 lines
1.0 KiB
JavaScript

const apiTarget = process.env.API_PROXY_TARGET || "http://127.0.0.1:8001";
const devApiRewrites = [
"/process_monitor",
"/server_info",
"/health",
"/status",
"/start",
"/stop",
"/restart",
"/get_config",
"/save_config",
"/get_url_config",
"/save_url_config",
"/service_action",
"/managed_roots",
"/managed_files",
"/managed_file",
"/hardware_profile",
"/system_snapshot",
"/youtube_pro_channels",
"/stack/:path*",
"/deploy/:path*",
"/android/:path*",
"/hub/:path*",
"/tiktok_replay/:path*",
"/shellcrash/apply_profile",
"/shellcrash/web_panel",
].map((source) => ({
source,
destination: `${apiTarget}${source}`,
}));
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
images: { unoptimized: true },
trailingSlash: false,
};
if (process.env.NODE_ENV === "development") {
nextConfig.rewrites = async () => {
return {
beforeFiles: [],
afterFiles: devApiRewrites,
fallback: [],
};
};
}
export default nextConfig;