@react-router/express 0.0.0-experimental-1f21bdfb5 → 0.0.0-experimental-2e661fbb4
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/CHANGELOG.md +17 -0
- package/dist/index.js +6 -4
- package/dist/index.mjs +6 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# `@react-router/express`
|
|
2
2
|
|
|
3
|
+
## 7.4.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies:
|
|
8
|
+
- `react-router@7.4.0`
|
|
9
|
+
- `@react-router/node@7.4.0`
|
|
10
|
+
|
|
11
|
+
## 7.3.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Update `express` `peerDependency` to include v5 (<https://github.com/remix-run/react-router/pull/13064>) ([#12961](https://github.com/remix-run/react-router/pull/12961))
|
|
16
|
+
- Updated dependencies:
|
|
17
|
+
- `react-router@7.3.0`
|
|
18
|
+
- `@react-router/node@7.3.0`
|
|
19
|
+
|
|
3
20
|
## 7.2.0
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/express v0.0.0-experimental-
|
|
2
|
+
* @react-router/express v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -70,9 +70,11 @@ function createRemixHeaders(requestHeaders) {
|
|
|
70
70
|
return headers;
|
|
71
71
|
}
|
|
72
72
|
function createRemixRequest(req, res) {
|
|
73
|
-
let [,
|
|
74
|
-
let [,
|
|
75
|
-
let
|
|
73
|
+
let [, hostnamePortStr] = req.get("X-Forwarded-Host")?.split(":") ?? [];
|
|
74
|
+
let [, hostPortStr] = req.get("host")?.split(":") ?? [];
|
|
75
|
+
let hostnamePort = Number.parseInt(hostnamePortStr, 10);
|
|
76
|
+
let hostPort = Number.parseInt(hostPortStr, 10);
|
|
77
|
+
let port = Number.isSafeInteger(hostnamePort) ? hostnamePort : Number.isSafeInteger(hostPort) ? hostPort : "";
|
|
76
78
|
let resolvedHost = `${req.hostname}${port ? `:${port}` : ""}`;
|
|
77
79
|
let url = new URL(`${req.protocol}://${resolvedHost}${req.originalUrl}`);
|
|
78
80
|
let controller = new AbortController();
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/express v0.0.0-experimental-
|
|
2
|
+
* @react-router/express v0.0.0-experimental-2e661fbb4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -48,9 +48,11 @@ function createRemixHeaders(requestHeaders) {
|
|
|
48
48
|
return headers;
|
|
49
49
|
}
|
|
50
50
|
function createRemixRequest(req, res) {
|
|
51
|
-
let [,
|
|
52
|
-
let [,
|
|
53
|
-
let
|
|
51
|
+
let [, hostnamePortStr] = req.get("X-Forwarded-Host")?.split(":") ?? [];
|
|
52
|
+
let [, hostPortStr] = req.get("host")?.split(":") ?? [];
|
|
53
|
+
let hostnamePort = Number.parseInt(hostnamePortStr, 10);
|
|
54
|
+
let hostPort = Number.parseInt(hostPortStr, 10);
|
|
55
|
+
let port = Number.isSafeInteger(hostnamePort) ? hostnamePort : Number.isSafeInteger(hostPort) ? hostPort : "";
|
|
54
56
|
let resolvedHost = `${req.hostname}${port ? `:${port}` : ""}`;
|
|
55
57
|
let url = new URL(`${req.protocol}://${resolvedHost}${req.originalUrl}`);
|
|
56
58
|
let controller = new AbortController();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/express",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-2e661fbb4",
|
|
4
4
|
"description": "Express server request handler for React Router",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/remix-run/react-router/issues"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@react-router/node": "0.0.0-experimental-
|
|
48
|
+
"@react-router/node": "0.0.0-experimental-2e661fbb4"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/express": "^4.17.9",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"express": "^4.17.1 || ^5",
|
|
63
63
|
"typescript": "^5.1.0",
|
|
64
|
-
"react-router": "0.0.0-experimental-
|
|
64
|
+
"react-router": "0.0.0-experimental-2e661fbb4"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"typescript": {
|