mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
Made robots.txt caching configurable
refs https://github.com/TryGhost/Toolbox/issues/411 - Having hardcoded cache control values in the codebase makes it impossible to experiment with new values without a version release. - Having all values configurable by default will allow for easier caching experiments and customizations on self-hosting instances. - Brings caching across both private and public robots file caching to same consistent and configurable value.
This commit is contained in:
parent
f6c7df4018
commit
e45eb4d5dd
@ -118,7 +118,7 @@ module.exports = function setupSiteApp(routerConfig) {
|
||||
debug('Themes done');
|
||||
|
||||
// Serve robots.txt if not found in theme
|
||||
siteApp.use(mw.servePublicFile('static', 'robots.txt', 'text/plain', constants.ONE_HOUR_S));
|
||||
siteApp.use(mw.servePublicFile('static', 'robots.txt', 'text/plain', config.get('caching:robotstxt:maxAge')));
|
||||
|
||||
// site map - this should probably be refactored to be an internal app
|
||||
sitemapHandler(siteApp);
|
||||
|
Loading…
Reference in New Issue
Block a user