0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/test/regression
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
..
api Fixed ETag header for admin templates not changing between versions (#13695) 2021-10-28 12:07:13 +01:00
exporter Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
importer 🐛 Fixed importing Stripe Plans with amount 0 (#12062) 2020-07-20 14:59:23 +02:00
migrations Added snippets permissions migration and fixtures (#12283) 2020-10-16 12:53:09 +01:00
models 🐛 Added multiple use grace period to tokens (#12519) 2021-01-18 17:03:41 +00:00
settings Added routes_hash setting (#12171) 2020-09-07 21:54:55 +12:00
site Added regression tests for the v3 endpoints 2021-01-22 16:32:03 +13:00
update-check Fixed linting error 2021-01-14 18:39:27 +13:00
README.md Updated acceptance&regression test suite readmes 2021-01-22 16:42:02 +13:00

Regression Tests

These tests should ensure that we don't break Ghost for all available APIs.

The goal is that most of these packages use Ghost's API's to test behaviours, otherwise transform the tests into unit tests.