mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-10 05:02:45 +01:00
added BASE_URL environment variable
This commit is contained in:
parent
dafe00cabb
commit
c488c1d724
@ -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'
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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.'
|
||||
}
|
||||
|
@ -7,15 +7,15 @@
|
||||
<meta name="defaultLanguage" content="en-US">
|
||||
<meta name="availableLanguages" content="{{availableLanguages}}">
|
||||
|
||||
<meta property="og:title" content="Firefox Send"/>
|
||||
<meta name="twitter:title" content="Firefox Send"/>
|
||||
<meta property="og:title" content="{{title}}"/>
|
||||
<meta name="twitter:title" content="{{title}}"/>
|
||||
<meta name="description" content="{{description}}"/>
|
||||
<meta property="og:description" content="{{description}}"/>
|
||||
<meta name="twitter:description" content="{{description}}"/>
|
||||
<meta name="twitter:card" content="summary"/>
|
||||
<meta property="og:image" content="{{envURL}}/resources/send-fb.jpg"/>
|
||||
<meta name="twitter:image" content="{{envURL}}/resources/send-twitter.jpg"/>
|
||||
<meta property="og:url" content="{{envURL}}"/>
|
||||
<meta property="og:image" content="{{baseUrl}}/resources/send-fb.jpg"/>
|
||||
<meta name="twitter:image" content="{{baseUrl}}/resources/send-twitter.jpg"/>
|
||||
<meta property="og:url" content="{{baseUrl}}"/>
|
||||
|
||||
<title>{{title}}</title>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user