From e2be44fb99f567a1169e4dd6929ea634e1e0cf03 Mon Sep 17 00:00:00 2001 From: Marie Date: Mon, 5 May 2025 13:03:39 +0000 Subject: [PATCH] change regex to include a zero-length match --- packages/backend/src/server/api/mastodon/endpoints/instance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/instance.ts b/packages/backend/src/server/api/mastodon/endpoints/instance.ts index 866a3acd44..7ed8d52313 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/instance.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/instance.ts @@ -50,7 +50,7 @@ export class ApiInstanceMastodon { const roles = await this.roleService.getUserPolicies(me?.id ?? null); const response: MastodonEntity.Instance = { - uri: this.config.url.replace(/^https?:\/\//, ''), + uri: this.config.url.replace(/^(https?:|)\/\//, ''), title: this.meta.name || 'Sharkey', description: this.meta.description || 'This is a vanilla Sharkey Instance. It doesn\'t seem to have a description.', email: instance.email || '',