feat(core): add edge and last-modified header, close #338

This commit is contained in:
DIYgod
2019-04-26 11:59:17 +08:00
parent 6692c4a4f4
commit 801f75c732
4 changed files with 27 additions and 1 deletions

View File

@@ -15,5 +15,7 @@ describe('header', () => {
expect(response.headers['access-control-allow-methods']).toBe('GET');
expect(response.headers['content-type']).toBe('application/xml; charset=utf-8');
expect(response.headers['cache-control']).toBe(`max-age=${config.cacheExpire / 2}`);
expect(response.headers['last-modified']).toBe(response.text.match(/<lastBuildDate>(.*)<\/lastBuildDate>/)[1]);
expect(response.headers.etag).toBe('"b37-MORyrF0tJ8BFw0xLLZL/zBYAFPY"');
});
});