From 158de3f76852cb93f38114f419749dc7d89e6945 Mon Sep 17 00:00:00 2001 From: Favo Yang Date: Sat, 14 Dec 2019 19:08:37 +0800 Subject: [PATCH] fix: search api will not set magic date header when return array (#1598) --- src/api/endpoint/api/search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/endpoint/api/search.ts b/src/api/endpoint/api/search.ts index a2908473c..8df4c5567 100644 --- a/src/api/endpoint/api/search.ts +++ b/src/api/endpoint/api/search.ts @@ -31,7 +31,7 @@ export default function(route, auth, storage): void { * when request /-/all/since, response is an array */ const respShouldBeArray = req.path.endsWith('/since'); - res.set('Date', 'Mon, 10 Oct 1983 00:12:48 GMT'); + if (!respShouldBeArray) res.set('Date', 'Mon, 10 Oct 1983 00:12:48 GMT'); const check_finish = function(): void { if (!received_end) { return;