diff --git a/backend/src/config/links.js b/backend/src/config/links.js index 6b945a5e0..f8de671f0 100644 --- a/backend/src/config/links.js +++ b/backend/src/config/links.js @@ -1,9 +1,11 @@ // this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding export default { + LANDING_PAGE: '/login', // examples: '/login', '/registration' ORGANIZATION: 'https://ocelot.social', SUPPORT: 'https://ocelot.social', - // on null or empty strings internal imprint is used, see 'webapp/locales/html/' + // on null or empty strings internal pages are used, see 'webapp/locales/html/' + // you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ DONATE: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly IMPRINT: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly TERMS_AND_CONDITIONS: null, diff --git a/webapp/constants/links.js b/webapp/constants/links.js index 6b945a5e0..f8de671f0 100644 --- a/webapp/constants/links.js +++ b/webapp/constants/links.js @@ -1,9 +1,11 @@ // this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding export default { + LANDING_PAGE: '/login', // examples: '/login', '/registration' ORGANIZATION: 'https://ocelot.social', SUPPORT: 'https://ocelot.social', - // on null or empty strings internal imprint is used, see 'webapp/locales/html/' + // on null or empty strings internal pages are used, see 'webapp/locales/html/' + // you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ DONATE: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly IMPRINT: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly TERMS_AND_CONDITIONS: null, diff --git a/webapp/middleware/authenticated.js b/webapp/middleware/authenticated.js index 3ea915bcc..1df2d4b11 100644 --- a/webapp/middleware/authenticated.js +++ b/webapp/middleware/authenticated.js @@ -1,4 +1,5 @@ import isEmpty from 'lodash/isEmpty' +import links from '~/constants/links.js' export default async ({ store, env, route, redirect }) => { const publicPages = env.publicPages @@ -22,5 +23,5 @@ export default async ({ store, env, route, redirect }) => { params.path = route.path } - return redirect('/registration', params) + return redirect(links.LANDING_PAGE, params) }