0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/test/utils
Kevin Ansfield 21ac7bb0f7
Fixed ETag header for admin templates not changing between versions (#13695)
refs https://github.com/TryGhost/Team/issues/1175
backports https://github.com/TryGhost/Ghost/pull/13680

We found the ETag header sent when serving the Admin template for /ghost/ was not changing between versions which after an upgrade could result in out of date cached content being served containing links to JS/CSS files that no longer existed.

The culprit is weak etags served by Node's `send` package, coupled with Admin template filesize not changing between versions and `npm pack` setting a fixed modification date for every file. See pillarjs/send#176 for more details.

- updated the Admin app's controller to read the template and generate an md5 hash of the contents so we can serve a strong ETag header value when serving the `/ghost/` html
2021-10-28 12:07:13 +01:00
..
fixtures Fixed ETag header for admin templates not changing between versions (#13695) 2021-10-28 12:07:13 +01:00
mocks 🔥 Added support for Node 14 2020-10-23 12:57:02 +01:00
api.js Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
assertions.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
configUtils.js Fixed "no-shadow" eslint warning in tests 2020-10-19 17:45:26 +13:00
index.js Added acceptance test for /member/:id/?include=email_recipients (#12477) 2020-12-11 18:45:35 +00:00
urlUtils.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00