Dynamic domain on index page code samples

This commit is contained in:
Jake
2014-10-19 20:47:16 -05:00
parent 3762a3f8bc
commit 02e23bcff8
2 changed files with 7 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ var router = express.Router();
/* GET home page. */
router.get('/', function(req, res) {
res.render('index', { title: 'Crafatar' });
res.render('index', { title: 'Crafatar', domain: req.protocol + "://" + req.headers.host });
});