mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 09:52:09 +03:00
Merge pull request #6386 from ErisDS/sitemap-fix
Fix cache-control header for sitemaps
This commit is contained in:
commit
3525f060dc
@ -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…
Reference in New Issue
Block a user