mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Use server basepath when creating reporting jobs (#72722)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
4dcf719edb
commit
82dd173b2a
2 changed files with 2 additions and 4 deletions
|
@ -13,7 +13,6 @@ export const scheduleTaskFnFactory: ScheduleTaskFnFactory<ESQueueCreateJobFn<
|
|||
JobParamsPNG
|
||||
>> = function createJobFactoryFn(reporting) {
|
||||
const config = reporting.getConfig();
|
||||
const setupDeps = reporting.getPluginSetupDeps();
|
||||
const crypto = cryptoFactory(config.get('encryptionKey'));
|
||||
|
||||
return async function scheduleTask(
|
||||
|
@ -32,7 +31,7 @@ export const scheduleTaskFnFactory: ScheduleTaskFnFactory<ESQueueCreateJobFn<
|
|||
headers: serializedEncryptedHeaders,
|
||||
browserTimezone,
|
||||
layout,
|
||||
basePath: setupDeps.basePath(req),
|
||||
basePath: config.kbnConfig.get('server', 'basePath'),
|
||||
forceNow: new Date().toISOString(),
|
||||
};
|
||||
};
|
||||
|
|
|
@ -13,7 +13,6 @@ export const scheduleTaskFnFactory: ScheduleTaskFnFactory<ESQueueCreateJobFn<
|
|||
JobParamsPDF
|
||||
>> = function createJobFactoryFn(reporting) {
|
||||
const config = reporting.getConfig();
|
||||
const setupDeps = reporting.getPluginSetupDeps();
|
||||
const crypto = cryptoFactory(config.get('encryptionKey'));
|
||||
|
||||
return async function scheduleTaskFn(
|
||||
|
@ -26,7 +25,7 @@ export const scheduleTaskFnFactory: ScheduleTaskFnFactory<ESQueueCreateJobFn<
|
|||
validateUrls(relativeUrls);
|
||||
|
||||
return {
|
||||
basePath: setupDeps.basePath(req),
|
||||
basePath: config.kbnConfig.get('server', 'basePath'),
|
||||
browserTimezone,
|
||||
forceNow: new Date().toISOString(),
|
||||
headers: serializedEncryptedHeaders,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue