• Rob Swindell's avatar
    Add dynamic file area/base indexing to web server · 23a82123
    Rob Swindell authored
    By setting sbbs.ini [web] FileIndexScript to an SSJS or XJS script filename, that script (by default, from your exec directory) will be executed when a file area/base listing has been http[s]-requested. File area/base requests are of the form <vpath_prefix> (for the list of libraries), <vpath_prefix>/<lib-name>/ (for list of directories of a library) or <vpath_prefix>/<lib-name>/<dir-code-suffix>/ (for a list of files in a directory). The new http_request "lib" and "dir" properties indicate that a library or directory listing was requested (if neither are defined, that's a request for the root / list of libs). The same configured script is executed to handle all 3 types of index/list requests.
    
    A sample script (webfileindex.ssj) will be committed soon.
    
    Authentication (via HTTP-AUTH) will be required if user #0 does not have access to all libraries or all directories within a required library.
    
    file_area.lib[].link has been changed from "/<vdir>/" to just ...
    23a82123