afbobak/nopar — pull request #12 by dunse (2013-11-17 11:10:50+00:00)
Title: Added support for base url.

Used to override url when hosted behind reverse proxy.
Instead of rewriting the meta json during caching, it rewrite all outgoing requests with the appropriate url.
If NOPAR_BASE_URL is unset (default), settings' host and port is used to create the tarball url.
If NOPAR_BASE_URL is set, this setting is used to construct the tarball url.
For example,
NOPAR_BASE_URL=http://myserver.com/npmregistry/
Request package name "express" would return tarball urls as:
http://myserver.com/npmregistry/express/-/express-3.3.6.tgz