Permalink
Browse files

use x-forwarded-proto in devcdn

  • Loading branch information...
1 parent ae6fa3e commit b97dff4bcdac096b8bcafdd2d375cdc0f8d69633 Paul Baumgart committed Jan 22, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/dev-cdn.js
View
@@ -81,7 +81,8 @@ function _bundleName(req) {
function _bundleUrl(req, bundleName) {
bundleName = bundleName || _bundleName(req);
- return 'http://' + req.headers.host + '/' + bundleName;
+ var proto = (req.headers['x-forwarded-proto'] ? req.headers['x-forwarded-proto'] + ':' : '');
+ return proto + '//' + req.headers.host + '/' + bundleName;
}
function createDevCdn(envOrBundleConfigs, cwd, loadedCallback) {

0 comments on commit b97dff4

Please sign in to comment.