Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #232 from cnpm/host-hotfix
Browse files Browse the repository at this point in the history
get request host from request.headers
  • Loading branch information
dead-horse committed Feb 28, 2014
2 parents 0ab314f + 1b47495 commit 818f216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports.getCDNKey = function (name, filename) {

exports.setDownloadURL = function (pkg, ctx, host) {
if (pkg.dist) {
host = host || ctx.host;
host = host || ctx.get('host') || ctx.host;
pkg.dist.tarball = util.format('%s://%s/%s/download/%s-%s.tgz',
ctx.protocol,
host, pkg.name, pkg.name, pkg.version);
Expand Down

0 comments on commit 818f216

Please sign in to comment.