mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-07 21:47:57 +08:00
feat(core): add edge and last-modified header, close #338
This commit is contained in:
@@ -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"');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user