0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added cache control headers to members api

closes https://github.com/TryGhost/Team/issues/846

- members api was missing cacheControl middleware to declare its cache control headers
This commit is contained in:
Rishabh 2021-07-06 20:17:59 +05:30 committed by Rishabh Garg
parent feae70d7c1
commit 5a1d3b0e95

View file

@ -15,6 +15,9 @@ module.exports = function setupMembersApp() {
// send 503 json response in case of maintenance
membersApp.use(shared.middlewares.maintenance);
// Members API shouldn't be cached
membersApp.use(shared.middlewares.cacheControl('private'));
// Support CORS for requests from the frontend
const siteUrl = new URL(urlUtils.getSiteUrl());
membersApp.use(cors(siteUrl.origin));