mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
16 lines
490 B
JavaScript
16 lines
490 B
JavaScript
const UrlUtils = require('@tryghost/url-utils');
|
|
const config = require('./config');
|
|
|
|
const urlUtils = new UrlUtils({
|
|
getSubdir: config.getSubdir,
|
|
getSiteUrl: config.getSiteUrl,
|
|
getAdminUrl: config.getAdminUrl,
|
|
apiVersions: config.get('api:versions'),
|
|
defaultApiVersion: config.get('api:versions:default'),
|
|
slugs: config.get('slugs').protected,
|
|
redirectCacheMaxAge: config.get('caching:301:maxAge'),
|
|
baseApiPath: '/ghost/api'
|
|
});
|
|
|
|
module.exports = urlUtils;
|