diff --git a/server/config.js b/server/config.js index 83e3e21e..7e9ba621 100644 --- a/server/config.js +++ b/server/config.js @@ -51,6 +51,11 @@ const conf = convict({ format: Boolean, default: false, env: 'L10N_DEV' + }, + base_url: { + format: 'url', + default: 'https://send.firefox.com', + env: 'BASE_URL' } }); diff --git a/server/server.js b/server/server.js index 65c1dcd8..733d43d5 100644 --- a/server/server.js +++ b/server/server.js @@ -38,16 +38,6 @@ function prodLangs() { const availableLanguages = conf.l10n_dev ? allLangs() : prodLangs(); -const envURL = (env) => { - switch (env) { - case 'test': - return 'https://send.stage.mozaws.net'; - case 'development': - return 'https://testpilot.dev.mozaws.net'; - } - return 'https://send.firefox.com'; -} - if (conf.env === 'development') { const webpack = require('webpack'); const webpackDevMiddleware = require('webpack-dev-middleware'); @@ -69,7 +59,7 @@ app.engine( helpers: { availableLanguages, l10nDev: conf.l10n_dev, - envURL: envURL(conf.env), + baseUrl: conf.base_url, title: 'Firefox Send', description: 'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.' } diff --git a/views/layouts/main.handlebars b/views/layouts/main.handlebars index be2fac90..ec60cd28 100644 --- a/views/layouts/main.handlebars +++ b/views/layouts/main.handlebars @@ -7,15 +7,15 @@ - - + + - - - + + + {{title}}