thevoidforge 21.0.1 → 21.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wizard/server.js +3 -16
- package/package.json +1 -1
package/dist/wizard/server.js
CHANGED
|
@@ -159,22 +159,9 @@ async function handleRequest(req, res) {
|
|
|
159
159
|
sendJson(res, 403, { success: false, error: 'Missing X-VoidForge-Request header' });
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
// LAN mode —
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const path = url.pathname;
|
|
166
|
-
const isLanSafe = path.startsWith('/api/danger-room/')
|
|
167
|
-
|| path.startsWith('/api/war-room/')
|
|
168
|
-
|| path === '/api/danger-room/heartbeat'
|
|
169
|
-
|| path.endsWith('.html') || path.endsWith('.js') || path.endsWith('.css')
|
|
170
|
-
|| path.endsWith('.svg') || path.endsWith('.png') || path.endsWith('.ico')
|
|
171
|
-
|| path === '/' || path === '/danger-room.html' || path === '/war-room.html'
|
|
172
|
-
|| path === '/lobby.html' || path.startsWith('/styles');
|
|
173
|
-
if (!isLanSafe) {
|
|
174
|
-
sendJson(res, 403, { success: false, error: 'Endpoint not available in LAN mode. Use --remote for full access.' });
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
162
|
+
// LAN mode — full access. LAN is a private network (ZeroTier, local subnet),
|
|
163
|
+
// inherently more secure than remote. No endpoint restrictions.
|
|
164
|
+
// Auth: optional password (no TOTP). All features available.
|
|
178
165
|
// Auth middleware — in remote mode, require valid session for non-exempt paths
|
|
179
166
|
if (isRemoteMode()) {
|
|
180
167
|
const url = new URL(req.url ?? '/', `http://${req.headers.host ?? 'localhost'}`);
|