mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Updated caching policy for /members/.well-known
refs https://github.com/TryGhost/Team/issues/1273 This endpoint currently only serves the members public key, which should never change. A 24 hours cache will drastically reduce the number of requests for the key, with little to no impact on functionality.
This commit is contained in:
parent
5d8f491823
commit
f58b5984cb
@ -125,7 +125,11 @@ module.exports = function setupSiteApp(options = {}) {
|
||||
siteApp.use(membersService.middleware.loadMemberSession);
|
||||
|
||||
// /member/.well-known/* serves files (e.g. jwks.json) so it needs to be mounted before the prettyUrl mw to avoid trailing slashes
|
||||
siteApp.use('/members/.well-known', (req, res, next) => membersService.api.middleware.wellKnown(req, res, next));
|
||||
siteApp.use(
|
||||
'/members/.well-known',
|
||||
shared.middleware.cacheControl('public', {maxAge: 60 * 60 * 24}),
|
||||
(req, res, next) => membersService.api.middleware.wellKnown(req, res, next)
|
||||
);
|
||||
|
||||
// setup middleware for internal apps
|
||||
// @TODO: refactor this to be a proper app middleware hook for internal apps
|
||||
|
Loading…
Reference in New Issue
Block a user