Skip to content

Commit a910126

Browse files
authored
fix(worker): init user agent early (renovatebot#35364)
1 parent c604668 commit a910126

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/workers/global/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,20 @@ export async function start(): Promise<number> {
145145
);
146146
}
147147

148-
// Set allowedHeaders in case hostRules headers are configured in file config
148+
// Set allowedHeaders and userAgent in case hostRules headers are configured in file config
149149
GlobalConfig.set({
150150
allowedHeaders: config.allowedHeaders,
151+
userAgent: config.userAgent,
151152
});
152153
// initialize all submodules
153154
config = await globalInitialize(config);
154155

155-
// Set platform, endpoint and allowedHeaders in case local presets are used
156+
// Set platform, endpoint, allowedHeaders and userAgent in case local presets are used
156157
GlobalConfig.set({
157158
allowedHeaders: config.allowedHeaders,
158159
platform: config.platform,
159160
endpoint: config.endpoint,
161+
userAgent: config.userAgent,
160162
});
161163

162164
await validatePresets(config);

0 commit comments

Comments
 (0)