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:
parent
4b104879cd
commit
993532bc1f
10 changed files with 62 additions and 1 deletions
|
|
@ -391,6 +391,10 @@ export const meta = {
|
|||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
robotsTxt: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
enableIdenticonGeneration: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
|
|
@ -708,6 +712,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
enableStatsForFederatedInstances: instance.enableStatsForFederatedInstances,
|
||||
enableServerMachineStats: instance.enableServerMachineStats,
|
||||
enableAchievements: instance.enableAchievements,
|
||||
robotsTxt: instance.robotsTxt,
|
||||
enableIdenticonGeneration: instance.enableIdenticonGeneration,
|
||||
bannedEmailDomains: instance.bannedEmailDomains,
|
||||
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue