Ghost/core/server/lib/url-utils.js

19 lines
533 B
JavaScript
Raw Normal View History

const UrlUtils = require('@tryghost/url-utils');
const config = require('../config');
const mobiledoc = require('./mobiledoc');
const urlUtils = new UrlUtils({
url: config.get('url'),
adminUrl: config.get('admin:url'),
apiVersions: config.get('api:versions'),
2019-09-17 10:43:31 +03:00
defaultApiVersion: 'v3',
slugs: config.get('slugs').protected,
redirectCacheMaxAge: config.get('caching:301:maxAge'),
baseApiPath: '/ghost/api',
get cardTransformers() {
return mobiledoc.cards;
}
});
module.exports = urlUtils;