add config for error images

Changelog: Added
This commit is contained in:
Johann150 2022-12-12 19:10:34 +01:00
parent 21069223e3
commit ae6ba05306
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
3 changed files with 19 additions and 0 deletions

View file

@ -133,3 +133,10 @@ redis:
#allowedPrivateNetworks: [ #allowedPrivateNetworks: [
# '127.0.0.1/32' # '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

View file

@ -38,6 +38,12 @@ export default function load(): Config {
config.port = config.port || parseInt(process.env.PORT || '', 10); 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; if (!config.maxNoteTextLength) config.maxNoteTextLength = 3000;
mixin.version = meta.version; mixin.version = meta.version;

View file

@ -67,6 +67,12 @@ export type Source = {
mediaProxy?: string; mediaProxy?: string;
proxyRemoteFiles?: boolean; proxyRemoteFiles?: boolean;
internalStoragePath?: string; internalStoragePath?: string;
images?: {
info?: string;
notFound?: string;
error?: string;
};
}; };
/** /**