diff --git a/backend/src/routes/agent-release.ts b/backend/src/routes/agent-release.ts index e72ff15..eacc829 100644 --- a/backend/src/routes/agent-release.ts +++ b/backend/src/routes/agent-release.ts @@ -13,7 +13,8 @@ const agentRelease: FastifyPluginAsync = async (fastify) => { if (!versionMatch) return reply.code(404).send({ error: 'latest.yml not found or invalid' }) const version = versionMatch[1].trim() const fileName = pathMatch?.[1].trim() ?? `HotelSync Agent Setup ${version}.exe` - return { version, fileName, downloadUrl: `/agent-updates/${encodeURIComponent(fileName)}` } + const host = process.env.API_PUBLIC_URL ?? 'https://api.hotelsync.ru' + return { version, fileName, downloadUrl: `${host}/agent-updates/${encodeURIComponent(fileName)}` } } catch { return reply.code(404).send({ error: 'No release available' }) }