Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c60a0c9d56 | ||
|
|
05b2dce394 |
No files matched your search
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "worldwideview",
|
||||
"version": "1.13.3",
|
||||
"version": "1.13.4",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"setup": "node scripts/setup.mjs",
|
||||
|
||||
@@ -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';
|
||||
@@ -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");
|
||||
}
|
||||
@@ -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. */
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user