Merge pull request #6386 from ErisDS/sitemap-fix

Fix cache-control header for sitemaps
This commit is contained in:
Sebastian Gierlinger 2016-01-26 13:01:57 +01:00
commit 3525f060dc
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,5 @@
var _ = require('lodash'),
utils = require('../../utils'),
utils = require('../../../utils'),
sitemap = require('./index');
// Responsible for handling requests for sitemap files

View File

@ -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));
});