mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
bootstrap: initialize http proxy after user module loader setup
The externalized undici relies on the user module loader, so in the externalized build, initialization of http proxy which relies on undici needs to be deferred until after the user module loader is initialized. PR-URL: https://github.com/nodejs/node/pull/58938 Refs: https://github.com/nodejs/node/issues/58865 Refs: https://github.com/nodejs/node/issues/57872 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
@@ -126,7 +126,6 @@ function prepareExecution(options) {
|
||||
initializeConfigFileSupport();
|
||||
|
||||
require('internal/dns/utils').initializeDns();
|
||||
setupHttpProxy();
|
||||
|
||||
if (isMainThread) {
|
||||
assert(internalBinding('worker').isMainThread);
|
||||
@@ -159,6 +158,10 @@ function prepareExecution(options) {
|
||||
setupUserModules(forceDefaultLoader);
|
||||
}
|
||||
|
||||
// This has to be done after the user module loader is initialized,
|
||||
// in case undici is externalized.
|
||||
setupHttpProxy();
|
||||
|
||||
return mainEntry;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user