mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
5b59c7b542
no issue - Removed v0.1 controllers - Removed 0.1 API unit tests - Removed 0.1 API app and mount point - Removed leftover use of v0.1 in entry-lookup test suite - Removed frontend client API enpoints and related code (middleware) - Fixed prev/next test suites to use v2 API - Set default API version to explicit v2 in UrlUtils - Removed v0.1 API regex from public files middleware
14 lines
426 B
JavaScript
14 lines
426 B
JavaScript
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'),
|
|
defaultApiVersion: 'v2',
|
|
slugs: config.get('slugs').protected,
|
|
redirectCacheMaxAge: config.get('caching:301:maxAge'),
|
|
baseApiPath: '/ghost/api'
|
|
});
|
|
|
|
module.exports = urlUtils;
|