@routr/processor 2.31.2 → 2.31.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/alterations.js +6 -3
- package/package.json +3 -3
package/dist/alterations.js
CHANGED
|
@@ -242,15 +242,18 @@ const removeAuthorization = (request) => {
|
|
|
242
242
|
};
|
|
243
243
|
exports.removeAuthorization = removeAuthorization;
|
|
244
244
|
// Whether a Route entry points at this EdgePort (one of its local or external
|
|
245
|
-
// addresses, on the port of the matching listening point)
|
|
245
|
+
// addresses or aliases, on the port of the matching listening point). Aliases
|
|
246
|
+
// compare case-insensitively (RFC 3261 section 19.1.4)
|
|
246
247
|
const isSelfRoute = (request) => (r) => {
|
|
247
|
-
var _a;
|
|
248
|
+
var _a, _b;
|
|
248
249
|
const localIps = request.localnets.map((ln) => ln.split("/")[0]);
|
|
249
250
|
const lp = common_1.Helper.getListeningPoint(request.listeningPoints, ((_a = r.address.uri.transportParam) === null || _a === void 0 ? void 0 : _a.toUpperCase()) ||
|
|
250
251
|
common_1.Transport.UDP);
|
|
251
252
|
const routeUri = r.address.uri;
|
|
253
|
+
const aliases = (request.aliases || []).map((a) => a.toLowerCase());
|
|
252
254
|
return ((localIps.includes(routeUri.host) ||
|
|
253
|
-
request.externalAddrs.includes(routeUri.host)
|
|
255
|
+
request.externalAddrs.includes(routeUri.host) ||
|
|
256
|
+
aliases.includes((_b = routeUri.host) === null || _b === void 0 ? void 0 : _b.toLowerCase())) &&
|
|
254
257
|
routeUri.port === (lp === null || lp === void 0 ? void 0 : lp.port));
|
|
255
258
|
};
|
|
256
259
|
const removeSelfRoutes = (request) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/processor",
|
|
3
|
-
"version": "2.31.
|
|
3
|
+
"version": "2.31.3",
|
|
4
4
|
"description": "Processor server and API",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@fonoster/logger": "0.6.0",
|
|
16
16
|
"@grpc/grpc-js": "~1.14.6",
|
|
17
17
|
"@grpc/proto-loader": "~0.7.10",
|
|
18
|
-
"@routr/common": "^2.31.
|
|
18
|
+
"@routr/common": "^2.31.3",
|
|
19
19
|
"fp-ts": "^2.11.8",
|
|
20
20
|
"phone": "^3.1.68"
|
|
21
21
|
},
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/fonoster/routr/issues"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "7178a8d1ad402c3a00b31b55c8b63ecd2527c975"
|
|
40
40
|
}
|