set cache headers on topic info (badges) response
authorJustin Wind <justin.wind+git@gmail.com>
Tue, 12 Apr 2022 22:42:19 +0000 (15:42 -0700)
committerJustin Wind <justin.wind+git@gmail.com>
Tue, 12 Apr 2022 22:42:19 +0000 (15:42 -0700)
src/manager.js

index c570671d94ada2bad567fc02f5598d923d90b04b..9d4a282c2aac17864d3e330ba4e655cd424493fc 100644 (file)
@@ -543,7 +543,10 @@ class Manager {
       ctx.count = count.count;
     });
 
-    res.end(this.infoContent(ctx));
+    const content = this.infoContent(ctx);
+    res.setHeader(Enum.Header.ETag, common.generateETag(undefined, undefined, content));
+    res.setHeader(Enum.Header.CacheControl, 'no-cache');
+    res.end(content);
     this.logger.info(_scope, 'finished', { ctx });
   }