diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/static.ts | 6 | ||||
-rw-r--r-- | server/initializers/checker.ts | 2 | ||||
-rw-r--r-- | server/initializers/constants.ts | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index eece9c06b..c1bf384a4 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -44,6 +44,12 @@ staticRouter.use( | |||
44 | asyncMiddleware(getPreview) | 44 | asyncMiddleware(getPreview) |
45 | ) | 45 | ) |
46 | 46 | ||
47 | // robots.txt service | ||
48 | staticRouter.get('/robots.txt', (req: express.Request, res: express.Response) => { | ||
49 | res.type('text/plain') | ||
50 | return res.send(CONFIG.INSTANCE.ROBOTS) | ||
51 | }) | ||
52 | |||
47 | // --------------------------------------------------------------------------- | 53 | // --------------------------------------------------------------------------- |
48 | 54 | ||
49 | export { | 55 | export { |
diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts index 9bf53e940..c11dc7a89 100644 --- a/server/initializers/checker.ts +++ b/server/initializers/checker.ts | |||
@@ -29,7 +29,7 @@ function checkMissedConfig () { | |||
29 | 'user.video_quota', | 29 | 'user.video_quota', |
30 | 'cache.previews.size', 'admin.email', 'signup.enabled', 'signup.limit', 'transcoding.enabled', 'transcoding.threads', | 30 | 'cache.previews.size', 'admin.email', 'signup.enabled', 'signup.limit', 'transcoding.enabled', 'transcoding.threads', |
31 | 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', | 31 | 'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route', |
32 | 'instance.default_nsfw_policy', | 32 | 'instance.default_nsfw_policy', 'instance.robots', |
33 | 'services.twitter.username', 'services.twitter.whitelisted' | 33 | 'services.twitter.username', 'services.twitter.whitelisted' |
34 | ] | 34 | ] |
35 | const miss: string[] = [] | 35 | const miss: string[] = [] |
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 5a7d91160..51d272895 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -180,7 +180,8 @@ const CONFIG = { | |||
180 | CUSTOMIZATIONS: { | 180 | CUSTOMIZATIONS: { |
181 | get JAVASCRIPT () { return config.get<string>('instance.customizations.javascript') }, | 181 | get JAVASCRIPT () { return config.get<string>('instance.customizations.javascript') }, |
182 | get CSS () { return config.get<string>('instance.customizations.css') } | 182 | get CSS () { return config.get<string>('instance.customizations.css') } |
183 | } | 183 | }, |
184 | get ROBOTS () { return config.get<string>('instance.robots') } | ||
184 | }, | 185 | }, |
185 | SERVICES: { | 186 | SERVICES: { |
186 | TWITTER: { | 187 | TWITTER: { |