@jeffusion/bungee-core 3.0.0 → 3.2.0
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/master.js +14 -0
- package/dist/worker.js +141 -12
- package/package.json +2 -2
package/dist/master.js
CHANGED
|
@@ -16165,6 +16165,20 @@ async function loadConfig(configPath) {
|
|
|
16165
16165
|
if (route.auth) {
|
|
16166
16166
|
validateAuthConfig(route.auth, `route "${route.path}"`);
|
|
16167
16167
|
}
|
|
16168
|
+
if (route.stickySession !== undefined) {
|
|
16169
|
+
if (typeof route.stickySession !== "object" || route.stickySession === null || Array.isArray(route.stickySession)) {
|
|
16170
|
+
logger.error(`Invalid stickySession config in route "${route.path}". stickySession must be an object.`);
|
|
16171
|
+
process.exit(1);
|
|
16172
|
+
}
|
|
16173
|
+
if (route.stickySession.enabled !== undefined && typeof route.stickySession.enabled !== "boolean") {
|
|
16174
|
+
logger.error(`Invalid stickySession.enabled in route "${route.path}". stickySession.enabled must be a boolean.`);
|
|
16175
|
+
process.exit(1);
|
|
16176
|
+
}
|
|
16177
|
+
if (route.stickySession.keyExpression !== undefined && typeof route.stickySession.keyExpression !== "string") {
|
|
16178
|
+
logger.error(`Invalid stickySession.keyExpression in route "${route.path}". stickySession.keyExpression must be a string.`);
|
|
16179
|
+
process.exit(1);
|
|
16180
|
+
}
|
|
16181
|
+
}
|
|
16168
16182
|
let totalWeight = 0;
|
|
16169
16183
|
for (const upstream of route.upstreams) {
|
|
16170
16184
|
if (typeof upstream.target !== "string") {
|