add a dynamic js script for page config

This commit is contained in:
Danny Coates 2017-07-19 14:00:10 -07:00
parent 262322b9e8
commit 85a7be01cb
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
5 changed files with 15 additions and 28 deletions

View file

@ -69,9 +69,15 @@ app.use('/l20n', express.static(L20N));
app.use('/locales', express.static(LOCALES));
app.get('/', (req, res) => {
res.render('index', {
res.render('index');
});
app.get('/jsconfig.js', (req, res) => {
res.set('Content-Type', 'application/javascript');
res.render('jsconfig', {
trackerId: conf.analytics_id,
dsn: conf.sentry_id
dsn: conf.sentry_id,
layout: false
});
});