@opennextjs/aws 3.7.3 → 3.7.4
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.
|
@@ -57,7 +57,12 @@ export class OpenNextNodeResponse extends Transform {
|
|
|
57
57
|
this.onEnd = onEnd;
|
|
58
58
|
this.streamCreator = streamCreator;
|
|
59
59
|
this.initialHeaders = initialHeaders;
|
|
60
|
-
if
|
|
60
|
+
// We only set the status code if it is not a NaN and it is a number
|
|
61
|
+
// Only allow status codes between 100 and 599 https://httpwg.org/specs/rfc9110.html#status.codes
|
|
62
|
+
if (statusCode &&
|
|
63
|
+
Number.isInteger(statusCode) &&
|
|
64
|
+
statusCode >= 100 &&
|
|
65
|
+
statusCode <= 599) {
|
|
61
66
|
this.statusCode = statusCode;
|
|
62
67
|
}
|
|
63
68
|
}
|