Skip to content

Commit

Permalink
do substitutions when necessary; don't make assumptions about our con…
Browse files Browse the repository at this point in the history
…fig based on NODE_ENV

Signed-off-by: Lloyd Hilaiel <lloyd@hilaiel.com>
  • Loading branch information
fetep authored and lloyd committed Oct 25, 2011
1 parent c80b644 commit f5be965
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ g_config['URL'] = g_config['scheme'] + '://' + g_config['hostname'] + getPortFor
* all source files are written for that environment.
*/
exports.performSubstitution = function(app) {
if (process.env['NODE_ENV'] !== 'production' &&
process.env['NODE_ENV'] !== 'local') {
if (g_config.hostname != 'browserid.org' ||
g_config.port != '443' ||
g_config.scheme != 'https') {
app.use(substitution.substitute({
'https://browserid.org': g_config['URL'],
'browserid.org:443': g_config['hostname'] + ':' + g_config['port'],
Expand Down

0 comments on commit f5be965

Please sign in to comment.