Adding robots.txt override via admin control panel

This is a requested low priority feature in #418 - I created the changes
to follow similarly to how the Instance Description is handled.
This commit is contained in:
Kinetix 2025-01-28 15:57:45 -08:00
parent 4b104879cd
commit 993532bc1f
10 changed files with 62 additions and 1 deletions

View file

@ -149,6 +149,7 @@ export const paramDef = {
enableStatsForFederatedInstances: { type: 'boolean' },
enableServerMachineStats: { type: 'boolean' },
enableAchievements: { type: 'boolean' },
robotsTxt: { type: 'string', nullable: true },
enableIdenticonGeneration: { type: 'boolean' },
serverRules: { type: 'array', items: { type: 'string' } },
bannedEmailDomains: { type: 'array', items: { type: 'string' } },
@ -636,6 +637,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.enableAchievements = ps.enableAchievements;
}
if (ps.robotsTxt !== undefined) {
set.robotsTxt = ps.robotsTxt;
}
if (ps.enableIdenticonGeneration !== undefined) {
set.enableIdenticonGeneration = ps.enableIdenticonGeneration;
}