mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
16728a3ef1
- Traditionally all of Ghost's public-facing text was written in British English - We're changing that to US English because that's more common - US English should also be used in code e.g. properties are called color not colour - most of these changes are in comments, but I've changed them so that we have US English in front of us always - fixed a few other typos I noticed whilst there
20 lines
638 B
JavaScript
20 lines
638 B
JavaScript
// Pretty URL redirects
|
|
//
|
|
// These are two pieces of middleware that handle ensuring that
|
|
// URLs get formatted correctly.
|
|
// Slashes ensures that we get trailing slashes
|
|
// Uncapitalise changes case to lowercase
|
|
// @TODO optimize this to reduce the number of redirects required to get to a pretty URL
|
|
// @TODO move this to being used by routers?
|
|
const slashes = require('connect-slashes');
|
|
const config = require('../../../../shared/config');
|
|
|
|
module.exports = [
|
|
slashes(true, {
|
|
headers: {
|
|
'Cache-Control': `public, max-age=${config.get('caching:301:maxAge')}`
|
|
}
|
|
}),
|
|
require('./uncapitalise')
|
|
];
|