diff --git a/.config/example.yml b/.config/example.yml index 75be5157d..2924114fb 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -133,3 +133,10 @@ redis: #allowedPrivateNetworks: [ # '127.0.0.1/32' #] + +# images used on error screens. You can use absolute or relative URLs. +# If you use relative URLs, be aware that the URL may be used on different pages/paths, so the path component should be absolute. +#images: +# info: /twemoji/1f440.svg +# notFound: /twemoji/2049.svg +# error: /twemoji/1f480.svg diff --git a/packages/backend/src/config/load.ts b/packages/backend/src/config/load.ts index 231f7c20b..84c4b4129 100644 --- a/packages/backend/src/config/load.ts +++ b/packages/backend/src/config/load.ts @@ -38,6 +38,12 @@ export default function load(): Config { config.port = config.port || parseInt(process.env.PORT || '', 10); + config.images = Object.assign({ + info: '/twemoji/1f440.svg', + notFound: '/twemoji/2040.svg', + error: '/twemoji/1f480.svg', + }, config.images ?? {}); + if (!config.maxNoteTextLength) config.maxNoteTextLength = 3000; mixin.version = meta.version; diff --git a/packages/backend/src/config/types.ts b/packages/backend/src/config/types.ts index 08198926b..55226ca47 100644 --- a/packages/backend/src/config/types.ts +++ b/packages/backend/src/config/types.ts @@ -67,6 +67,12 @@ export type Source = { mediaProxy?: string; proxyRemoteFiles?: boolean; internalStoragePath?: string; + + images?: { + info?: string; + notFound?: string; + error?: string; + }; }; /**