Fix missing or incorrect cache-control headers for Streaming server (#32551)
This commit is contained in:
@@ -98,9 +98,11 @@ export function setupMetrics(channels, pgPool) {
|
||||
const requestHandler = (req, res) => {
|
||||
metrics.register.metrics().then((output) => {
|
||||
res.set('Content-Type', metrics.register.contentType);
|
||||
res.set('Cache-Control', 'private, no-store');
|
||||
res.end(output);
|
||||
}).catch((err) => {
|
||||
req.log.error(err, "Error collecting metrics");
|
||||
res.set('Cache-Control', 'private, no-store');
|
||||
res.status(500).end();
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user