-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build and exceptions on azure (#1334)
Towards fixing #1285 Fix > LanguageWorkerConsoleLog[error] Worker d515a7ff-9c85-424a-9dbb-7ad7c02d98e8 uncaught exception (learn more: https://go.microsoft.com/fwlink/?linkid=2097909 ): TypeError: res._implicitHeader is not a function at writetop (/home/site/wwwroot/functions/node_modules/express-session/index.js:276:15) at ServerResponse.end (/home/site/wwwroot/functions/node_modules/express-session/index.js:343:16) at Immediate.<anonymous> (file:///home/site/wwwroot/functions/node_modules/h3/dist/index.mjs:138:17) at processImmediate (internal/timers.js:464:21) and fixes (hopefully) that azure builds two app instances by running `yarn build` and `yarn build:azure` Followup #1335
- Loading branch information
1 parent
0bff227
commit df09e39
Showing
4 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/index.js b/index.js | ||
index 40a442baf2fec2c6bdce79a5fba5086b5b8aac07..321ddabde7361d6ce6b5da450af1be4d6caf3017 100644 | ||
--- a/index.js | ||
+++ b/index.js | ||
@@ -273,7 +273,10 @@ function session(options) { | ||
} | ||
|
||
if (!res._header) { | ||
- res._implicitHeader() | ||
+ // CHANGED: Workaround for issue with Azure deploy: https://github.com/unjs/nitro/issues/351 | ||
+ // Original code taken from https://github.com/nodejs/node/blob/main/lib/_http_server.js | ||
+ res.writeHead(res.statusCode) | ||
+ // res._implicitHeader() | ||
} | ||
|
||
if (chunk == null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters