xxscreeps-mod-client 0.3.1 → 0.3.2
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/backend.js +5 -1
- package/package.json +1 -1
package/backend.js
CHANGED
|
@@ -61,7 +61,11 @@ const rootRedirect = readBool('SCREEPS_MOD_CLIENT_ROOT_REDIRECT', mountPath !==
|
|
|
61
61
|
// Paths that should never be handled by the client mod, even when mounted at '/'.
|
|
62
62
|
// Can be overridden via SCREEPS_MOD_CLIENT_EXCLUDE (comma-separated prefixes).
|
|
63
63
|
// Note: /assets/ is reserved by the game server; the client bundle uses /_client/ instead.
|
|
64
|
-
|
|
64
|
+
// Do NOT exclude /map/ — it's a client-side SPA route (/map/<shard>). xxscreeps has no
|
|
65
|
+
// HTTP route there (map-stats is under /api/, map render assets under /assets/, the map
|
|
66
|
+
// renderer is a websocket), and the await-next()-then-404-fallback below already leaves
|
|
67
|
+
// any real server route untouched.
|
|
68
|
+
const DEFAULT_EXCLUDES = ['/api/', '/socket', '/backend/', '/auth/', '/assets/']
|
|
65
69
|
const excludePrefixes = process.env.SCREEPS_MOD_CLIENT_EXCLUDE
|
|
66
70
|
? process.env.SCREEPS_MOD_CLIENT_EXCLUDE.split(',').map(s => s.trim()).filter(Boolean)
|
|
67
71
|
: DEFAULT_EXCLUDES
|