mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
16 lines
599 B
JavaScript
16 lines
599 B
JavaScript
import { NextResponse } from "next/server";
|
|
import { getSettings } from "@/lib/localDb";
|
|
|
|
export async function GET() {
|
|
try {
|
|
const settings = await getSettings();
|
|
const requireLogin = settings.requireLogin !== false;
|
|
const tunnelDashboardAccess = settings.tunnelDashboardAccess !== false;
|
|
const tunnelUrl = settings.tunnelUrl || "";
|
|
const tailscaleUrl = settings.tailscaleUrl || "";
|
|
return NextResponse.json({ requireLogin, tunnelDashboardAccess, tunnelUrl, tailscaleUrl });
|
|
} catch (error) {
|
|
return NextResponse.json({ requireLogin: true }, { status: 200 });
|
|
}
|
|
}
|