Commit 5c6f8c0a by Girish Ramakrishnan

use APP_ORIGIN instead of HOSTNAME

1 parent d3ceae29
Showing with 1 additions and 1 deletions
...@@ -29,7 +29,7 @@ router.put ('/api/files/*', auth.ldap, multipart, files.put); ...@@ -29,7 +29,7 @@ router.put ('/api/files/*', auth.ldap, multipart, files.put);
router.delete('/api/files/*', auth.ldap, files.del); router.delete('/api/files/*', auth.ldap, files.del);
// welcome screen in case / does not serve up any file yet // welcome screen in case / does not serve up any file yet
var appUrl = process.env.HOSTNAME ? 'https://' + process.env.HOSTNAME : 'http://localhost:3000'; var appUrl = process.env.APP_ORIGIN ? process.env.APP_ORIGIN : 'http://localhost:3000';
router.get('/', function (req, res) { res.status(200).send(ejs.render(fs.readFileSync(path.join(__dirname, '/app/welcome.html'), 'utf8'), { appUrl: appUrl })); }); router.get('/', function (req, res) { res.status(200).send(ejs.render(fs.readFileSync(path.join(__dirname, '/app/welcome.html'), 'utf8'), { appUrl: appUrl })); });
app.use(morgan('dev')); app.use(morgan('dev'));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!