mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 04:43:12 +03:00
9aa8e3e7ff
- updated usage of url-utils.urlFor to work with v3 Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
17 lines
470 B
JavaScript
17 lines
470 B
JavaScript
const UrlUtils = require('@tryghost/url-utils');
|
|
const config = require('./config');
|
|
|
|
const BASE_API_PATH = '/ghost/api';
|
|
|
|
const urlUtils = new UrlUtils({
|
|
getSubdir: config.getSubdir,
|
|
getSiteUrl: config.getSiteUrl,
|
|
getAdminUrl: config.getAdminUrl,
|
|
slugs: config.get('slugs').protected,
|
|
redirectCacheMaxAge: config.get('caching:301:maxAge'),
|
|
baseApiPath: BASE_API_PATH
|
|
});
|
|
|
|
module.exports = urlUtils;
|
|
module.exports.BASE_API_PATH = BASE_API_PATH;
|