public StaticBuilder AddFolderAlias(string path, string alias, params string[] headers)
 {
     if (!alias.StartsWith("/")) alias = '/' + alias;
     if (!alias.EndsWith("/")) alias = alias + '/';
     _folders[alias] = new StaticFolder(path, alias, ParseHeaders(headers));
     return this;
 }
Example #2
0
 /// <summary>
 /// Adds a folder. All files below that folder will be accessible.
 /// </summary>
 /// <param name="path">The path to the folder from the web application root.</param>
 /// <param name="alias">The public alias to use for the file.</param>
 /// <param name="headers">The headers for files below the folder.</param>
 /// <returns>Current instance.</returns>
 public StaticBuilder AddFolderAlias(string path, string alias, params string[] headers)
 {
     if (!alias.StartsWith("/"))
     {
         alias = '/' + alias;
     }
     if (!alias.EndsWith("/"))
     {
         alias = alias + '/';
     }
     _folders[alias] = new StaticFolder(path, alias, ParseHeaders(headers));
     return(this);
 }