mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Merge pull request #6386 from ErisDS/sitemap-fix
Fix cache-control header for sitemaps
This commit is contained in:
commit
3525f060dc
2 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
var _ = require('lodash'),
|
||||
utils = require('../../utils'),
|
||||
utils = require('../../../utils'),
|
||||
sitemap = require('./index');
|
||||
|
||||
// Responsible for handling requests for sitemap files
|
||||
|
|
|
@ -1048,6 +1048,7 @@ describe('Frontend Routing', function () {
|
|||
it('should serve sitemap.xml', function (done) {
|
||||
request.get('/sitemap.xml')
|
||||
.expect(200)
|
||||
.expect('Cache-Control', testUtils.cacheRules.hour)
|
||||
.expect('Content-Type', 'text/xml; charset=utf-8')
|
||||
.end(doEnd(done));
|
||||
});
|
||||
|
@ -1055,6 +1056,7 @@ describe('Frontend Routing', function () {
|
|||
it('should serve sitemap-posts.xml', function (done) {
|
||||
request.get('/sitemap-posts.xml')
|
||||
.expect(200)
|
||||
.expect('Cache-Control', testUtils.cacheRules.hour)
|
||||
.expect('Content-Type', 'text/xml; charset=utf-8')
|
||||
.end(doEnd(done));
|
||||
});
|
||||
|
@ -1062,6 +1064,7 @@ describe('Frontend Routing', function () {
|
|||
it('should serve sitemap-pages.xml', function (done) {
|
||||
request.get('/sitemap-posts.xml')
|
||||
.expect(200)
|
||||
.expect('Cache-Control', testUtils.cacheRules.hour)
|
||||
.expect('Content-Type', 'text/xml; charset=utf-8')
|
||||
.end(doEnd(done));
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue