High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat(server): allow subpaths for machine learning URL (#28427)
Nojus Gudinavičiusb0c9743d9ad0
diff --git a/server/src/repositories/machine-learning.repository.ts b/server/src/repositories/machine-learning.repository.tsindex 49778b5193..6792e8ecf4 100644--- a/server/src/repositories/machine-learning.repository.ts+++ b/server/src/repositories/machine-learning.repository.ts@@ -132,7 +132,7 @@ export class MachineLearningRepository {private async check(url: string) {let healthy = false;try {- const response = await fetch(new URL('/ping', url), {+ const response = await fetch(new URL('ping', url), {signal: AbortSignal.timeout(this.config.availabilityChecks.timeout),});if (response.ok) {@@ -170,7 +170,7 @@ export class MachineLearningRepository {...this.config.urls.filter((url) => !this.isHealthy(url)),]) {try {- const response = await fetch(new URL('/predict', url), { method: 'POST', body: formData });+ const response = await fetch(new URL('predict', url), { method: 'POST', body: formData });if (response.ok) {this.setHealthy(url, true);return response.json();