0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added cache control headers to members api (#13904)

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

- members api was missing cacheControl middleware to declare its cache control headers

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
This commit is contained in:
Fabien 'egg' O'Carroll 2022-01-07 23:43:13 +02:00 committed by GitHub
parent cdbab0d5c3
commit eb8a37de54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,9 @@ module.exports = function setupMembersApp() {
// Entire app is behind labs flag
membersApp.use(shared.middlewares.labs.members);
// 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));