code: function (req, bucket) {
                  var location = getLocation(req),
                      href = location.origin;
  
                  // Since we are getting a link for an item the href must end with slash
                  if (href.substr(-1) !== '/') {
                      href += '/';
                  }
                  
                  // Add the bucket and search
                  href += bucket + location.search;
  
                  return href;
              }
docs: Set strict routing that /buckets/test/abc is not the same as /buckets/test/abc/ adding the slash at the end denotes creating a folder and not a file