Uppercased Content-Version header use

refs https://github.com/TryGhost/Toolbox/issues/227

- The convention across the codebase is to define headers with capitalized first letters. This change does not affect the output though as all headers are served lowercased anyway.
- Might be a good idea to make all headers lowercased one day to match the casing with the outputs
This commit is contained in:
Naz 2022-04-14 15:21:35 +08:00
parent bfbece948e
commit fa82722b03

View File

@ -83,7 +83,7 @@ const http = (apiImpl) => {
// CASE: generate headers based on the api ctrl configuration
if (req && req.headers && req.headers['accept-version'] && res.locals) {
headers['content-version'] = `v${res.locals.safeVersion}`;
headers['Content-Version'] = `v${res.locals.safeVersion}`;
}
res.set(headers);