feat: pass baseUrl in Easynews++ config and add optional EASYNEWS_PLUS_PLUS_PUBLIC_URL.

This commit is contained in:
Viren070
2025-05-22 22:03:20 +01:00
parent ab3ac1090a
commit b41e210c04
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -540,6 +540,10 @@ export const Settings = cleanEnv(process.env, {
default: 'https://easynews-cloudflare-worker.jqrw92fchz.workers.dev/',
desc: 'Easynews++ URL',
}),
EASYNEWS_PLUS_PLUS_PUBLIC_URL: url({
default: undefined,
desc: 'Easynews++ public URL',
}),
DEFAULT_EASYNEWS_PLUS_PLUS_TIMEOUT: num({
default: undefined,
desc: 'Default Easynews++ timeout',
@@ -57,6 +57,9 @@ const getEasynewsPlusPlusConfigString = (
showQualities: '4k,1080p,720p,480p',
maxResultsPerQuality: '',
maxFileSize: '',
baseUrl: (
Settings.EASYNEWS_PLUS_PLUS_PUBLIC_URL || Settings.EASYNEWS_PLUS_PLUS_URL
).replace(/\/$/, ''),
};
return encodeURIComponent(JSON.stringify(options));
};