Download src/app/api/settings/require-login/route.js from heyeyydss/api9nin: direct link, hf CLI and curl.
- Browser
- Download file 599 Bytes
-
https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/app/api/settings/require-login/route.js
- Command line
-
hf download hf://spaces/heyeyydss/api9nin/src/app/api/settings/require-login/route.js
-
curl -L -o route.js https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/app/api/settings/require-login/route.js
599 Bytes
| 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 }); | |
| } | |
| } | |