change regex to include a zero-length match

This commit is contained in:
Marie 2025-05-05 13:03:39 +00:00
parent 581cc2b513
commit e2be44fb99

View file

@ -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 || '',