@@ -16,7 +16,7 @@ import { getSettings, updateSettings } from "@/lib/localDb";
|
||||
|
||||
initDbHooks(getSettings, updateSettings);
|
||||
|
||||
const DEFAULT_MITM_ROUTER_BASE = "http://127.0.0.1:20128";
|
||||
const DEFAULT_MITM_ROUTER_BASE = "http://localhost:20128";
|
||||
|
||||
function normalizeMitmRouterBaseUrlInput(input) {
|
||||
if (input == null || String(input).trim() === "") {
|
||||
|
||||
15
src/app/api/version/shutdown/route.js
Normal file
15
src/app/api/version/shutdown/route.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { killAppProcesses } from "@/lib/appUpdater";
|
||||
|
||||
// Shutdown app to release file locks for manual update
|
||||
export async function POST() {
|
||||
try {
|
||||
await killAppProcesses();
|
||||
} catch { /* best effort */ }
|
||||
|
||||
const response = NextResponse.json({ success: true, message: "Shutting down for manual update..." });
|
||||
|
||||
setTimeout(() => process.exit(0), 500);
|
||||
|
||||
return response;
|
||||
}
|
||||
Reference in New Issue
Block a user