mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 08:54:36 +03:00
Made members JWKS endpoint caching configurable
refs https://github.com/TryGhost/Toolbox/issues/411
refs f58b5984cb
- Having hardcoded cache control values in the codebase makes it impossible to experiment with new values without a version release.
- Having all values configurable by default will allow for easier caching experiments and customizations on self-hosting instances.
- This change only changes the members endpoint caching configurability. The other JWKS endpoint will be modified separately (following commit), to keep changes concise
This commit is contained in:
parent
5331ba3999
commit
8c47819194
@ -94,7 +94,7 @@ module.exports = function setupSiteApp(routerConfig) {
|
||||
// /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',
|
||||
shared.middleware.cacheControl('public', {maxAge: constants.ONE_DAY_S}),
|
||||
shared.middleware.cacheControl('public', {maxAge: config.get('caching:wellKnown:maxAge')}),
|
||||
(req, res, next) => membersService.api.middleware.wellKnown(req, res, next)
|
||||
);
|
||||
|
||||
|
@ -126,6 +126,9 @@
|
||||
"robotstxt": {
|
||||
"maxAge": 3600000
|
||||
},
|
||||
"wellKnown": {
|
||||
"maxAge": 86400
|
||||
},
|
||||
"cors": {
|
||||
"maxAge": 86400
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user