diff options
Diffstat (limited to 'packages/backend/src/server/web/ClientServerService.ts')
| -rw-r--r-- | packages/backend/src/server/web/ClientServerService.ts | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index c40d042fa4..2df92e4607 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -150,10 +150,10 @@ export class ClientServerService { let manifest = { // 空文字列の場合右辺を使いたいため // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - 'short_name': this.meta.shortName || this.meta.name || this.config.host, + 'short_name': this.meta.shortName || this.meta.name || this.config.webHost, // 空文字列の場合右辺を使いたいため // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - 'name': this.meta.name || this.config.host, + 'name': this.meta.name || this.config.webHost, 'start_url': '/', 'display': 'standalone', 'background_color': '#313a42', @@ -213,7 +213,8 @@ export class ClientServerService { serverErrorImageUrl: meta.serverErrorImageUrl ?? '/client-assets/status/error.png', infoImageUrl: meta.infoImageUrl ?? '/client-assets/status/nothinghere.png', notFoundImageUrl: meta.notFoundImageUrl ?? '/client-assets/status/missingpage.webp', - instanceUrl: this.config.url, + instanceUrl: this.config.webUrl, + localUrl: this.config.localUrl, randomMOTD: this.config.customMOTD ? this.config.customMOTD[Math.floor(Math.random() * this.config.customMOTD.length)] : undefined, metaJson: htmlSafeJsonStringify(await this.metaEntityService.packDetailed(meta)), now: Date.now(), @@ -441,8 +442,8 @@ export class ClientServerService { content += `<ShortName>${name}</ShortName>`; content += `<Description>${name} Search</Description>`; content += '<InputEncoding>UTF-8</InputEncoding>'; - content += `<Image width="16" height="16" type="image/x-icon">${this.config.url}/favicon.ico</Image>`; - content += `<Url type="text/html" template="${this.config.url}/search?q={searchTerms}"/>`; + content += `<Image width="16" height="16" type="image/x-icon">${this.config.webUrl}/favicon.ico</Image>`; + content += `<Url type="text/html" template="${this.config.webUrl}/search?q={searchTerms}"/>`; content += '</OpenSearchDescription>'; reply.header('Content-Type', 'application/opensearchdescription+xml'); @@ -455,7 +456,7 @@ export class ClientServerService { reply.header('Cache-Control', 'public, max-age=30'); return await reply.view('base', { img: this.meta.bannerUrl, - url: this.config.url, + url: this.config.webUrl, title: this.meta.name ?? 'Sharkey', desc: this.meta.description, customHead: this.config.customHtml.head, @@ -889,8 +890,8 @@ export class ClientServerService { return await reply.view('info-card', { version: this.config.version, - host: this.config.host, - url: this.config.url, + host: this.config.webHost, + url: this.config.webUrl, meta: this.meta, originalUsersCount: await this.usersRepository.countBy({ host: IsNull() }), originalNotesCount: await this.notesRepository.countBy({ userHost: IsNull() }), |