code: function(path, secure) {
        var root = app.get('static url').replace(/.*:\/\//, '');
        var proto = 'http';
  
        if (path && path[0] === '/') {
          path = path.slice(1);
        }
  
        if (secure) {
          root =
            undefsafe(config, 'url.ssl.static') ||
            undefsafe(config, 'url.static') ||
            undefsafe(config, 'url.host');
          proto = 'https';
        }
  
        return path
          ? proto + '://' + root + '/' + (path || '')
          : proto + '://' + root;
      }
docs: Returns a url for a static resource.