mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Wired up Offer redirects to the site app
refs https://github.com/TryGhost/Team/issues/1091 This piece of middleware will handle redirecting from offer codes to the relavant portal URL.
This commit is contained in:
parent
3742a4afb7
commit
561ef348c9
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,7 @@ const appService = require('../../../frontend/services/apps');
|
|||
const themeEngine = require('../../../frontend/services/theme-engine');
|
||||
const themeMiddleware = themeEngine.middleware;
|
||||
const membersService = require('../../services/members');
|
||||
const offersService = require('../../services/offers');
|
||||
const siteRoutes = require('./routes');
|
||||
const shared = require('../shared');
|
||||
const mw = require('./middleware');
|
||||
|
@ -84,6 +85,8 @@ module.exports = function setupSiteApp(options = {}) {
|
|||
// enable CORS headers (allows admin client to hit front-end when configured on separate URLs)
|
||||
siteApp.use(cors(corsOptionsDelegate));
|
||||
|
||||
siteApp.use(offersService.middleware);
|
||||
|
||||
// you can extend Ghost with a custom redirects file
|
||||
// see https://github.com/TryGhost/Ghost/issues/7707
|
||||
shared.middlewares.customRedirects.use(siteApp);
|
||||
|
|
Loading…
Reference in a new issue