@routr/processor 2.0.8-alpha.17 → 2.0.8-alpha.19
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 +3 -3
- package/dist/helper.js +2 -1
- package/package.json +3 -3
package/dist/alterations.js
CHANGED
|
@@ -90,8 +90,8 @@ const applyXHeaders = (route) => (request) => {
|
|
|
90
90
|
if (route.headers && route.headers.length > 0) {
|
|
91
91
|
const headersToRemove = route.headers
|
|
92
92
|
.filter((h) => h.action === common_1.CommonTypes.HeaderModifierAction.REMOVE)
|
|
93
|
-
.map((h) => h.name);
|
|
94
|
-
const headersToAdd = route.headers.filter((h) => h.action
|
|
93
|
+
.map((h) => h.name.toLowerCase());
|
|
94
|
+
const headersToAdd = route.headers.filter((h) => h.action === common_1.CommonTypes.HeaderModifierAction.ADD);
|
|
95
95
|
req.message.extensions = req.message.extensions.filter((h) => !headersToRemove.includes(h.name.toLowerCase()));
|
|
96
96
|
headersToAdd.forEach((h) => {
|
|
97
97
|
req.message.extensions.push({ name: h.name, value: h.value });
|
|
@@ -183,7 +183,7 @@ const removeSelfRoutes = (request) => {
|
|
|
183
183
|
const localIps = request.localnets.map((ln) => ln.split("/")[0]);
|
|
184
184
|
req.message.route = req.message.route.filter((r) => {
|
|
185
185
|
var _a;
|
|
186
|
-
const lp = common_1.Helper.getListeningPoint(request.listeningPoints, ((_a = r.address.uri.transportParam) === null || _a === void 0 ? void 0 : _a.
|
|
186
|
+
const lp = common_1.Helper.getListeningPoint(request.listeningPoints, ((_a = r.address.uri.transportParam) === null || _a === void 0 ? void 0 : _a.toUpperCase()) ||
|
|
187
187
|
common_1.Transport.UDP);
|
|
188
188
|
const routeUri = r.address.uri;
|
|
189
189
|
return !((localIps.includes(routeUri.host) ||
|
package/dist/helper.js
CHANGED
|
@@ -52,6 +52,7 @@ exports.getEdgeInterface = getEdgeInterface;
|
|
|
52
52
|
* @return {Route} the route
|
|
53
53
|
*/
|
|
54
54
|
function createRouteFromLastMessage(request) {
|
|
55
|
+
var _a;
|
|
55
56
|
const uri = request.message.requestUri;
|
|
56
57
|
const sessionCount = index_1.Extensions.getHeaderValue(request, common_1.CommonTypes.ExtraHeader.SESSION_COUNT)
|
|
57
58
|
? parseInt(index_1.Extensions.getHeaderValue(request, common_1.CommonTypes.ExtraHeader.SESSION_COUNT))
|
|
@@ -61,7 +62,7 @@ function createRouteFromLastMessage(request) {
|
|
|
61
62
|
user: uri.user,
|
|
62
63
|
host: uri.host,
|
|
63
64
|
port: uri.port,
|
|
64
|
-
transport: uri.transportParam.
|
|
65
|
+
transport: (_a = uri.transportParam) === null || _a === void 0 ? void 0 : _a.toUpperCase(),
|
|
65
66
|
registeredOn: Date.now(),
|
|
66
67
|
sessionCount,
|
|
67
68
|
expires: index_1.Target.getTargetExpires(request),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/processor",
|
|
3
|
-
"version": "2.0.8-alpha.
|
|
3
|
+
"version": "2.0.8-alpha.19",
|
|
4
4
|
"description": "Processor server and API",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@opentelemetry/sdk-trace-base": "^1.0.4",
|
|
24
24
|
"@opentelemetry/sdk-trace-node": "^1.0.4",
|
|
25
25
|
"@opentelemetry/semantic-conventions": "^1.0.4",
|
|
26
|
-
"@routr/common": "^2.0.8-alpha.
|
|
26
|
+
"@routr/common": "^2.0.8-alpha.19",
|
|
27
27
|
"fp-ts": "^2.11.8"
|
|
28
28
|
},
|
|
29
29
|
"directories": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"bugs": {
|
|
44
44
|
"url": "https://github.com/fonoster/routr/issues"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "ff62abb0ff7704a79f98a8e0b10c0036b949cc11"
|
|
47
47
|
}
|