mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
fix(security): explicitly declare cache-control header instead of using middleware
This commit reverts 1f6f389ff2
This commit is contained in:
@@ -420,6 +420,10 @@ helpers.formatApiResponse = async (statusCode, res, payload) => {
|
||||
}
|
||||
|
||||
if (String(statusCode).startsWith('2')) {
|
||||
if (res.req.loggedIn) {
|
||||
res.set('cache-control', 'private');
|
||||
}
|
||||
|
||||
res.status(statusCode).json({
|
||||
status: {
|
||||
code: 'ok',
|
||||
|
||||
Reference in New Issue
Block a user