0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/shared/url-utils.js
2021-06-18 21:49:28 +01:00

15 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;