2019-06-18 16:13:55 +03:00
|
|
|
const UrlUtils = require('@tryghost/url-utils');
|
|
|
|
const config = require('../../config');
|
|
|
|
|
|
|
|
const urlUtils = new UrlUtils({
|
|
|
|
url: config.get('url'),
|
|
|
|
adminUrl: config.get('admin:url'),
|
|
|
|
apiVersions: config.get('api:versions'),
|
2019-09-11 20:10:10 +03:00
|
|
|
defaultApiVersion: 'v2',
|
2019-06-18 16:13:55 +03:00
|
|
|
slugs: config.get('slugs').protected,
|
|
|
|
redirectCacheMaxAge: config.get('caching:301:maxAge'),
|
|
|
|
baseApiPath: '/ghost/api'
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = urlUtils;
|