Permalink
Browse files

Allow hostname override on seed stamp

  • Loading branch information...
1 parent f1f596f commit 3a3e081dd73943c7928575e04233577bba14808d @davglass committed Jul 24, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/seed.js
View
6 lib/seed.js
@@ -20,12 +20,12 @@ module.exports = {
return function(req, res, next) {
//Set the filter type for the seed fetch
var filt = req.query.filter ? req.query.filter : 'min',
-
+ host = req.headers['x-forwarded-from'] || req.headers.host,
//Stamp the seed config and version
seedStamp = '\n\n/* Stamping Seed File */\n' +
'YUI.applyConfig({\n' +
- ' comboBase: "http://' + req.headers.host + '/yui?",\n' +
- ' base: "http://' + req.headers.host + '/build/",\n' +
+ ' comboBase: "http://' + host + '/yui?",\n' +
+ ' base: "http://' + host + '/build/",\n' +
' combine: true,\n' +
' root: "",\n' +
' filter: "' + filt + '"\n' +

0 comments on commit 3a3e081

Please sign in to comment.