Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created November 30, 2013 00:15
Show Gist options
  • Save isaacs/7713696 to your computer and use it in GitHub Desktop.
Save isaacs/7713696 to your computer and use it in GitHub Desktop.
if (req.url~ "^/[^/]+/-/[^/]+\.tgz") {
set req.url = regsub(req.url, "^/([^/]+)/-/([^/]+\.tgz)", "/isaacs/public/npm/$1/_attachments/$2");
} else {
set req.url = "/isaacs/public/npm/" req.url "/doc.json";
}
@jed
Copy link

jed commented Nov 30, 2013

on line 2, attachments should clearly be attachpeoplets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment