From d3dba8ac95522399c56393cf49d85c7471d0f957 Mon Sep 17 00:00:00 2001 From: 0fatal <72899968+0fatal@users.noreply.github.com> Date: Thu, 24 Aug 2023 18:52:16 +0800 Subject: [PATCH] fix(server): fix website hosting routes (#1490) --- server/src/gateway/apisix.service.ts | 2 +- server/src/monitor/monitor.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/gateway/apisix.service.ts b/server/src/gateway/apisix.service.ts index 7a50e2b587..d16f099889 100644 --- a/server/src/gateway/apisix.service.ts +++ b/server/src/gateway/apisix.service.ts @@ -211,7 +211,7 @@ export class ApisixService { conf: [ { name: 'try-path', - value: `{"paths":["$uri", "$uri/", "$uriindex.html", "$uri/index.html"], "host": "http://${upstreamNode}/${website.bucketName}"}`, + value: `{"paths":["$uri", "$uri/", "$uriindex.html", "$uri/index.html", "index.html"], "host": "http://${upstreamNode}/${website.bucketName}"}`, }, ], }, diff --git a/server/src/monitor/monitor.service.ts b/server/src/monitor/monitor.service.ts index 54b2d6e1e6..c388588892 100644 --- a/server/src/monitor/monitor.service.ts +++ b/server/src/monitor/monitor.service.ts @@ -104,7 +104,7 @@ export class MonitorService { const conf = await this.getPrometheusConf(appid) if (!conf?.apiUrl) { this.logger.warn('Metrics not available for no endpoint') - return [] + return {} } const opts = {