Compare commits

...
Author SHA1 Message Date
Antigravity AI c60a0c9d56 fix(core): fix production plugin loading errors [Patch]
- inject engine URL into globalThis for runtime bundle plugins
- update satellite, iranwarlive, gps-jamming to read global reference
- fix military-bases loaded as bundle by SQLite db format override
2026-04-18 18:44:49 +12:00
Silvertakana 05b2dce394 Merge pull request #34 from silvertakana/bug/33-security-hardening
fix: harden endpoints against SSRF, DNS rebinding, open redirects, and error leaks
2026-04-18 16:53:40 +12:00
Antigravity AI 390518be0f fix(security): harden endpoints against SSRF, DNS rebinding, open redirects, and error leaks 2026-04-18 16:45:51 +12:00
Antigravity AI e07bc60672 fix(marketplace): apply demo default config to dynamic plugins [Patch] 2026-04-18 16:11:31 +12:00
Antigravity AI d75618f9aa fix(core): allow marketplace bearer token admin access on demo [Patch] 2026-04-18 15:54:23 +12:00
Silvertakana aa34e1c49d Merge pull request #32 from silvertakana/add-claude-github-actions-1776483677184
Add Claude Code GitHub Workflow
2026-04-18 15:41:48 +12:00
Silvertakana 2f618ce2cf "Update Claude Code Review workflow" 2026-04-18 15:41:21 +12:00
Silvertakana 085f4aa90c "Update Claude PR Assistant workflow" 2026-04-18 15:41:19 +12:00
Silvertakana c1ddb91268 Merge pull request #31 from silvertakana/feature/30-enable-demo-admin-privileges
feat(core): enable admin functionality on demo instance
2026-04-18 15:39:54 +12:00
Antigravity AI b3bc62ad8e feat(core): enable admin functionality on demo instance [Minor]
- allow demo-admin to bypass plugin installation blockers [Minor]

- allow demo-admin to use timeline history playback mode [Minor]
2026-04-18 15:21:01 +12:00
Silvertakana 32a4df4952 Merge pull request #29 from silvertakana/feature/plugin-extraction
feat(plugins): decentralize plugin architecture and marketplace updates
2026-04-18 14:31:46 +12:00
26 changed files with 196 additions and 81 deletions

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
name: Claude Code Review
on:
pull_request_target:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
# Optional: Only run on specific file changes
# paths:
+1 -1
View File
@@ -46,5 +46,5 @@ jobs:
# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'
# claude_args: '--allowed-tools Bash(gh pr *)'
+1
View File
@@ -0,0 +1 @@
docker run --rm -v nmn55t4io3myfubs72worn7k_wwv-data:/data nouchka/sqlite3 /data/wwv.db "UPDATE InstalledPlugin SET config = json_set(config, '$.format', 'static', '$.dataFile', 'https://cdn.jsdelivr.net/npm/@worldwideview/[email protected]/data/military-bases.geojson') WHERE pluginId = 'military-bases';"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "worldwideview",
"version": "1.12.0",
"version": "1.13.4",
"private": true,
"scripts": {
"setup": "node scripts/setup.mjs",
+1 -1
View File
@@ -227,5 +227,5 @@ export type DataBusEvents = {
};
globeReady: Record<string, never>;
};
export * from "./viteGlobals.js";
export * from "./viteGlobals";
//# sourceMappingURL=index.d.ts.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAKpC,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3D,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,EACxB,IAAI,GAAE,cAAmB,GAC1B,MAAM,CA4BR;AAGD,YAAY,EAAE,cAAc,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C,EAAE,GAAG,CAAA;KAAE,Line truncated
+1 -1
View File
@@ -42,4 +42,4 @@ export function createSvgIconUrl(Icon, opts = {}) {
].join("");
return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(wrappedSvg)}`;
}
export * from "./viteGlobals.js";
export * from "./viteGlobals";
+1
View File
@@ -0,0 +1 @@
UPDATE installed_plugins SET config = json_set(config, '$.format', 'static', '$.dataFile', 'https://cdn.jsdelivr.net/npm/@worldwideview/[email protected]/data/military-bases.geojson') WHERE pluginId = 'military-bases';
+1 -1
View File
@@ -24,7 +24,7 @@ export async function GET() {
return NextResponse.json({ cameras: cache.data, cached: true, stale: true });
}
return NextResponse.json(
{ error: "Failed to fetch GDOT cameras", details: error.message },
{ error: "Failed to fetch GDOT cameras" },
{ status: 502 },
);
}
+26 -8
View File
@@ -4,11 +4,14 @@ import { isAuthEnabled } from "@/core/edition";
import { cameraProxyLimiter } from "@/lib/rateLimiters";
import { getClientIp } from "@/lib/rateLimit";
import dns from "dns/promises";
/**
* Block requests to private/internal networks to prevent SSRF attacks.
* Resolves the domain to an IP address first to prevent basic DNS rebinding.
* Allows any external URL (needed for user-configured custom camera sources).
*/
function isPrivateUrl(urlStr: string): boolean {
async function isPrivateUrl(urlStr: string): Promise<boolean> {
try {
const parsed = new URL(urlStr);
const host = parsed.hostname;
@@ -19,21 +22,36 @@ function isPrivateUrl(urlStr: string): boolean {
// If developer overrides local restrictions, bypass checks
if (process.env.WWV_PROXY_ALLOW_LOCAL === "true") return false;
// Block localhost variants
// Block localhost variants upfront
if (host === "localhost" || host === "127.0.0.1" || host === "::1") return true;
// Block private IPv4 ranges
const parts = host.split(".").map(Number);
// Block cloud metadata endpoints explicitly
if (host === "metadata.google.internal") return true;
// Resolve the host to its IP address to prevent DNS rebinding
let resolvedIp: string;
try {
const lookupResult = await dns.lookup(host);
resolvedIp = lookupResult.address;
} catch {
return true; // DNS resolution failed
}
// Block private IPv4 ranges using resolved IP
const parts = resolvedIp.split(".").map(Number);
if (parts.length === 4 && parts.every((n) => !isNaN(n))) {
if (parts[0] === 10) return true; // 10.0.0.0/8
if (parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) return true; // 172.16.0.0/12
if (parts[0] === 192 && parts[1] === 168) return true; // 192.168.0.0/16
if (parts[0] === 169 && parts[1] === 254) return true; // link-local
if (parts[0] === 0) return true; // 0.0.0.0/8
if (parts[0] === 127) return true; // 127.0.0.0/8
}
// Block simple IPv6 private/local ranges
if (resolvedIp === "::1" || resolvedIp.startsWith("fe80:") || resolvedIp.startsWith("fc") || resolvedIp.startsWith("fd")) {
return true;
}
// Block cloud metadata endpoints
if (host === "metadata.google.internal") return true;
return false;
} catch {
@@ -60,7 +78,7 @@ export async function GET(req: NextRequest) {
return NextResponse.json({ error: "Missing 'url' parameter" }, { status: 400 });
}
if (isPrivateUrl(targetUrl)) {
if (await isPrivateUrl(targetUrl)) {
return NextResponse.json(
{ error: "Requests to private/internal networks are not allowed" },
{ status: 403 },
+19 -3
View File
@@ -7,7 +7,9 @@ import { getClientIp } from "@/lib/rateLimit";
const BLOCKED_HOSTS = ["localhost", "127.0.0.1", "::1", "metadata.google.internal"];
const MAX_STREAM_DURATION_MS = 5 * 60 * 1000; // 5 minutes
function isPrivateUrl(urlStr: string): boolean {
import dns from "dns/promises";
async function isPrivateUrl(urlStr: string): Promise<boolean> {
try {
const parsed = new URL(urlStr);
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return true;
@@ -18,14 +20,28 @@ function isPrivateUrl(urlStr: string): boolean {
if (BLOCKED_HOSTS.includes(host)) return true;
const parts = host.split(".").map(Number);
let resolvedIp: string;
try {
const lookupResult = await dns.lookup(host);
resolvedIp = lookupResult.address;
} catch {
return true; // DNS resolution failed
}
const parts = resolvedIp.split(".").map(Number);
if (parts.length === 4 && parts.every((n) => !isNaN(n))) {
if (parts[0] === 10) return true;
if (parts[0] === 172 && parts[1] >= 16 && parts[1] <= 31) return true;
if (parts[0] === 192 && parts[1] === 168) return true;
if (parts[0] === 169 && parts[1] === 254) return true;
if (parts[0] === 0) return true;
if (parts[0] === 127) return true;
}
if (resolvedIp === "::1" || resolvedIp.startsWith("fe80:") || resolvedIp.startsWith("fc") || resolvedIp.startsWith("fd")) {
return true;
}
return false;
} catch {
return true;
@@ -52,7 +68,7 @@ export async function GET(req: NextRequest) {
return NextResponse.json({ error: "Missing 'url' parameter" }, { status: 400 });
}
if (isPrivateUrl(targetUrl)) {
if (await isPrivateUrl(targetUrl)) {
return NextResponse.json(
{ error: "Requests to private/internal networks are not allowed" },
{ status: 403 },
+1 -1
View File
@@ -56,7 +56,7 @@ export async function GET() {
});
}
return NextResponse.json(
{ error: "Failed to fetch traffic cameras", details: error.message },
{ error: "Failed to fetch traffic cameras" },
{ status: 502 },
);
}
+11 -7
View File
@@ -4,7 +4,7 @@ import { auth } from "@/lib/auth";
import { issueMarketplaceToken } from "@/lib/marketplace/marketplaceToken";
import { grantTokenLimiter } from "@/lib/rateLimiters";
import { getClientIp } from "@/lib/rateLimit";
import { isPluginInstallEnabled } from "@/core/edition";
import { isPluginInstallEnabled, isDemo, isDemoAdmin } from "@/core/edition";
const ALLOWED_REDIRECT_HOSTS = new Set([
"localhost",
@@ -50,16 +50,20 @@ export async function GET(request: NextRequest) {
const session = await auth();
if (!session?.user) {
// Use forwarded host or Host header for correct public URL behind reverse proxy
const host = request.headers.get("x-forwarded-host") ?? request.headers.get("host") ?? request.nextUrl.host;
const proto = request.headers.get("x-forwarded-proto") ?? (request.nextUrl.protocol.replace(":", ""));
const origin = `${proto}://${host}`;
// Use configured app URL to prevent Host header injection open redirects
const origin = process.env.NEXT_PUBLIC_APP_URL || process.env.APP_URL || request.nextUrl.origin;
const loginUrl = new URL("/login", origin);
const callbackUrl = request.nextUrl.pathname + request.nextUrl.search;
loginUrl.searchParams.set("callbackUrl", `${origin}${callbackUrl}`);
// Construct a relative path for callback to ensure it redirects back to the identical host
const callbackPath = request.nextUrl.pathname + request.nextUrl.search;
loginUrl.searchParams.set("callbackUrl", callbackPath);
return NextResponse.redirect(loginUrl);
}
if (isDemo && !isDemoAdmin(session)) {
return NextResponse.json({ error: "Admin access required on Demo edition" }, { status: 403 });
}
if (!redirectTo || !isSafeRedirect(redirectTo)) {
return NextResponse.json({ error: "Invalid or missing redirectTo" }, { status: 400 });
}
@@ -7,7 +7,7 @@ import type { PluginManifest } from "@/core/plugins/PluginManifest";
import { validateManifest } from "@/core/plugins/validateManifest";
import { installLimiter } from "@/lib/rateLimiters";
import { getClientIp } from "@/lib/rateLimit";
import { isPluginInstallEnabled } from "@/core/edition";
import { isPluginInstallEnabled, isDemo, isDemoAdmin } from "@/core/edition";
import { getVerifiedPluginIds } from "@/lib/marketplace/registryClient";
const ALLOWED_REDIRECT_HOSTS = new Set([
@@ -49,11 +49,20 @@ export async function GET(request: NextRequest) {
// Not logged in — send to login with this URL as callbackUrl
if (!session?.user) {
const loginUrl = new URL("/login", request.nextUrl.origin);
loginUrl.searchParams.set("callbackUrl", request.nextUrl.toString());
const origin = process.env.NEXT_PUBLIC_APP_URL || process.env.APP_URL || request.nextUrl.origin;
const loginUrl = new URL("/login", origin);
const callbackPath = request.nextUrl.pathname + request.nextUrl.search;
loginUrl.searchParams.set("callbackUrl", callbackPath);
return NextResponse.redirect(loginUrl);
}
if (isDemo && !isDemoAdmin(session)) {
return NextResponse.json(
{ error: "Admin access required on Demo edition" },
{ status: 403 }
);
}
const pluginId = searchParams.get("pluginId");
const manifestB64 = searchParams.get("manifest");
const version = searchParams.get("version") ?? "1.0.0";
+2 -8
View File
@@ -21,13 +21,7 @@ export async function POST(request: Request) {
);
}
// On demo, only the admin session may install plugins
if (isDemo && !isDemoAdmin(await auth())) {
return withCors(
NextResponse.json({ error: "Admin access required" }, { status: 403 }),
request,
);
}
const rateLimited = marketplaceApiLimiter.check(getClientIp(request));
if (rateLimited) return withCors(rateLimited, request);
@@ -38,7 +32,7 @@ export async function POST(request: Request) {
try {
const body = await request.json();
const { pluginId, version, manifest } = body;
console.log("[Marketplace Install Route] Payload received:", JSON.stringify(body, null, 2));
console.log(`[Marketplace Install Route] Installing plugin: ${pluginId} v${version || "1.0.0"}`);
if (!pluginId || typeof pluginId !== "string") {
return withCors(
+16 -2
View File
@@ -42,7 +42,14 @@ export async function GET(request: Request) {
}));
const plugins = [...activeDbPlugins, ...builtInRecords];
return withCors(NextResponse.json({ plugins }), request);
let canManagePlugins = !isDemo;
if (isDemo) {
const authError = await validateMarketplaceAuth(request);
canManagePlugins = authError === null;
}
return withCors(NextResponse.json({ plugins, canManagePlugins }), request);
} catch (err) {
console.error("[marketplace/status] Error:", err);
// Fallback: return built-in plugins when DB is unavailable
@@ -52,7 +59,14 @@ export async function GET(request: Request) {
config: "{}",
installedAt: "",
}));
return withCors(NextResponse.json({ plugins: fallback }), request);
let canManagePlugins = !isDemo;
if (isDemo) {
const authError = await validateMarketplaceAuth(request);
canManagePlugins = authError === null;
}
return withCors(NextResponse.json({ plugins: fallback, canManagePlugins }), request);
}
}
+1 -7
View File
@@ -22,13 +22,7 @@ export async function POST(request: Request) {
);
}
// On demo, only the admin session may uninstall plugins
if (isDemo && !isDemoAdmin(await auth())) {
return withCors(
NextResponse.json({ error: "Admin access required" }, { status: 403 }),
request,
);
}
const rateLimited = marketplaceApiLimiter.check(getClientIp(request));
if (rateLimited) return withCors(rateLimited, request);
+3 -6
View File
@@ -92,14 +92,11 @@ export async function POST(req: Request) {
}
return NextResponse.json(
{
error: "All Overpass mirrors failed or timed out. The OSM servers are likely under heavy load.",
lastError
},
{ status: lastError?.status || 504 }
{ error: "All Overpass mirrors failed or timed out. The OSM servers are likely under heavy load." },
{ status: 504 }
);
} catch (e: any) {
console.error(`[OSMSearchProxy] Internal error:`, e);
return NextResponse.json({ error: e.message }, { status: 500 });
return NextResponse.json({ error: "Internal server error" }, { status: 500 });
}
}
+25 -19
View File
@@ -103,6 +103,7 @@ export function PluginsTab() {
const [checkingUpdates, setCheckingUpdates] = useState(false);
const [updating, setUpdating] = useState<string | null>(null);
const [needsReload, setNeedsReload] = useState(false);
const [canInstall, setCanInstall] = useState<boolean>(isPluginInstallEnabled);
const loadPlugins = useCallback(async () => {
try {
@@ -110,6 +111,9 @@ export function PluginsTab() {
if (!res.ok) return;
const data = await res.json();
setPlugins(data.plugins ?? []);
if (typeof data.canManagePlugins === "boolean") {
setCanInstall(data.canManagePlugins);
}
} catch {
/* non-critical */
}
@@ -275,7 +279,7 @@ export function PluginsTab() {
<TrustBadge trust={getTrust(record)} />
</div>
</div>
{isPluginInstallEnabled && (
{canInstall && (
<div className="plugin-item__actions">
{updates[record.pluginId] ? (
<button
@@ -303,27 +307,29 @@ export function PluginsTab() {
))}
</div>
<div className="plugins-tab__actions-bottom">
<button
className="plugins-tab__check-updates"
onClick={handleCheckUpdates}
disabled={checkingUpdates}
>
<RefreshCw size={14} className={checkingUpdates ? "spinning" : ""} />
{checkingUpdates ? "Checking..." : "Check for Updates"}
</button>
{Object.keys(updates).length > 1 && (
{canInstall && (
<div className="plugins-tab__actions-bottom">
<button
className="plugins-tab__update-all"
onClick={handleUpdateAll}
disabled={updating !== null}
className="plugins-tab__check-updates"
onClick={handleCheckUpdates}
disabled={checkingUpdates}
>
<Download size={14} />
Update All ({Object.keys(updates).length})
<RefreshCw size={14} className={checkingUpdates ? "spinning" : ""} />
{checkingUpdates ? "Checking..." : "Check for Updates"}
</button>
)}
</div>
{Object.keys(updates).length > 1 && (
<button
className="plugins-tab__update-all"
onClick={handleUpdateAll}
disabled={updating !== null}
>
<Download size={14} />
Update All ({Object.keys(updates).length})
</button>
)}
</div>
)}
<BrowseLink />
</div>
+9 -1
View File
@@ -2,7 +2,7 @@
import React, { useState, useEffect } from "react";
import { useStore } from "@/core/state/store";
import { isHistoryEnabled } from "@/core/edition";
import { isHistoryEnabled as default_isHistoryEnabled, isDemo, DEMO_ADMIN_ROLE } from "@/core/edition";
export function Timeline() {
const currentTime = useStore((s) => s.currentTime);
@@ -18,11 +18,19 @@ export function Timeline() {
const timeRange = useStore((s) => s.timeRange);
const [mounted, setMounted] = useState(false);
const [isDemoAdmin, setIsDemoAdmin] = useState(false);
useEffect(() => {
setMounted(true);
if (!isDemo) return;
fetch("/api/auth/session")
.then((r) => r.json())
.then((s) => setIsDemoAdmin(s?.user?.role === DEMO_ADMIN_ROLE))
.catch(() => {});
}, []);
const isHistoryEnabled = default_isHistoryEnabled || isDemoAdmin;
const totalMs = timeRange.end.getTime() - timeRange.start.getTime();
const currentMs = currentTime.getTime() - timeRange.start.getTime();
const progress = totalMs > 0 ? Math.max(0, Math.min(1, currentMs / totalMs)) : 0;
+17 -2
View File
@@ -62,7 +62,6 @@ export function useMarketplaceSync() {
}
}
/** Load a single manifest into the plugin manager. */
async function loadManifest(manifest: PluginManifest) {
if (!manifest.id || loadedIds.current.has(manifest.id)) return;
if (pluginManager.getPlugin(manifest.id)) {
@@ -73,7 +72,23 @@ export function useMarketplaceSync() {
try {
console.log(`[MarketplaceSync] Loading manifest: ${manifest.id}`);
await pluginManager.loadFromManifest(manifest);
initLayer(manifest.id);
let shouldEnable = false;
if (isDemo) {
const envVar = process.env.NEXT_PUBLIC_DEMO_DEFAULT_PLUGINS || "";
const demoDefaultPlugins = new Set<string>();
envVar.split(",").forEach((s) => {
const clean = s.trim();
if (clean) demoDefaultPlugins.add(clean);
});
shouldEnable = demoDefaultPlugins.has(manifest.id);
}
initLayer(manifest.id, shouldEnable);
if (shouldEnable) {
await pluginManager.enablePlugin(manifest.id);
}
loadedIds.current.add(manifest.id);
console.log(`[MarketplaceSync] Hot-loaded plugin "${manifest.id}"`);
} catch (err) {
+6
View File
@@ -48,5 +48,11 @@ export function injectHostGlobals(): void {
CameraStream,
};
if (process.env.NEXT_PUBLIC_DEFAULT_ENGINE_URL) {
(globalThis as any).__WWV_ENGINE_URL__ = process.env.NEXT_PUBLIC_DEFAULT_ENGINE_URL;
} else {
(globalThis as any).__WWV_ENGINE_URL__ = typeof window !== 'undefined' ? window.location.origin : 'http://localhost:5001';
}
console.log("[HostGlobals] React and SDK injected for dynamic plugins");
}
+7 -1
View File
@@ -1,6 +1,7 @@
import { NextResponse } from "next/server";
import { auth } from "@/lib/auth";
import { verifyMarketplaceToken } from "./marketplaceToken";
import { isDemo, isDemoAdmin } from "@/core/edition";
/**
* Validate marketplace API access. Accepts (in order):
@@ -13,7 +14,12 @@ export async function validateMarketplaceAuth(
): Promise<NextResponse | null> {
// 1. Try session auth first
const session = await auth();
if (session?.user) return null;
if (session?.user) {
if (isDemo && !isDemoAdmin(session)) {
return NextResponse.json({ error: "Admin access required" }, { status: 403 });
}
return null;
}
// 2. Try marketplace JWT bearer token
const authHeader = request.headers.get("authorization");
+2 -2
View File
@@ -20,7 +20,7 @@ export const cameraProxyLimiter = new RateLimiter({
/** /api/marketplace/install-redirect — prevents install spam. */
export const installLimiter = new RateLimiter({
windowMs: 60_000,
maxRequests: 10,
maxRequests: 60,
});
/** /api/marketplace/grant-token — prevents JWT generation spam. */
@@ -32,7 +32,7 @@ export const grantTokenLimiter = new RateLimiter({
/** /api/marketplace/status, install, uninstall — general marketplace API. */
export const marketplaceApiLimiter = new RateLimiter({
windowMs: 60_000,
maxRequests: 20,
maxRequests: 60,
});
/** /api/auth/[...nextauth] — prevents credential brute-force. */
+10 -4
View File
@@ -47,14 +47,20 @@ export default async function proxy(req: NextRequest) {
// Not logged in — check if first-run (no users)
try {
const url = new URL("/api/auth/setup-status", req.nextUrl.origin);
const res = await fetch(url);
const appUrl = process.env.NEXT_PUBLIC_APP_URL || process.env.APP_URL || `http://127.0.0.1:${process.env.PORT || "3000"}`;
const url = new URL("/api/auth/setup-status", appUrl);
const res = await fetch(url.toString(), {
headers: {
"User-Agent": "WorldWideView-Middleware",
}
});
const data = await res.json();
if (data.needsSetup) {
return NextResponse.redirect(new URL("/setup", req.nextUrl));
return NextResponse.redirect(new URL("/setup", req.nextUrl)); // NextResponse.redirect correctly bounds redirect to client
}
} catch {
} catch (e) {
// Fall through to login redirect
console.error("[proxy.ts] Failed to fetch setup status:", e);
}
return NextResponse.redirect(new URL("/login", req.nextUrl));
+20
View File
@@ -0,0 +1,20 @@
**Describe the bug**
Plugins fail to load on the production Coolify deployment:
1. `military-bases` fails to load with `ManifestLoadError: Failed to load valid WorldPlugin from bundle`.
2. Several runtime plugins (satellite, iranwarlive, gps-jamming) try to fetch from `localhost:5001` resulting in connection refused in production.
**To Reproduce**
1. Deploy WWV to a non-local environment like Coolify.
2. Enable `military-bases`. Observe error in console.
3. Enable `satellite` or other data plugins. Observe the browser network tab failing to reach `localhost:5001`.
**Expected behavior**
Plugins correctly inherit `NEXT_PUBLIC_DEFAULT_ENGINE_URL` dynamically from the host `globalThis` environment. Static plugins correctly instantiate as static instead of evaluating to a bundle.
**Screenshots/Logs**
`[MarketplaceSync] Failed to load "military-bases": ... Failed to load valid WorldPlugin from bundle`
**Environment:**
- OS: Server/Coolify
- Browser: Any
- WorldWideView Edition: demo