The fancyindex_directories_first directive allows one to enable or
disable grouping directories first before all files when sorting.
This is accomplished by changing the sort function from ngx_qsort (which
is the plain stdlib qsort under the hood) to ngx_sort which is a stable
insertion sort (per ngx_string.c).
We call ngx_sort with the standard sort_cmp_func (albeit modified to remove
grouping dirs), and then, if fancyindex_directories_first is set, call
ngx_sort again with ngx_http_fancyindex_cmp_entries_dirs_first which sorts
entries according to the directories first criterion.
Because a stable sorting function is used, the relative primary order is
preserved when we call ngx_sort again.
Change int (*sort_cmp_func) (const void*, const void*) to ngx_int_t
(*sort_cmp_func) (const void*, const void*) to satisfy ngx_sort.
Travis-CI better signifies the build status, as it tries building with
combinations of compilers, nginx versions, and dynamic vs. statically
linked modules.
This directive enables someone using a custom header to disable the output of the indexed directory by the module
Useful when you want to create links to previous directories via PHP for example
This attempts to address hanging requests when fancyindex is
combined with ngx_pagespeed. The change makes fancyindex check
the return value of ngx_http_send_header in a way that is just
the same as nginx's autoindex module - which makes the modules
work for me when I test with ngx_pagespeed.
The value for fancyindex_css_href was not being propagated properly, so
overriding its value did not work as expected. For example the following
configuration:
http {
# ...
fancyindex_css_href "/css/global.css";
location /subdir/ {
fancyindex_css_href "/css/local.css";
}
}
would always use "global.css", even when accessing file listings under
"/subdir".
This patch fixes the issue.
This patch adds a new configuration directive fancyindex_time_format, which
accepts a strftime()-style format string used to format the timestamps in the
generated listings. The accepted format specifiers are an useful subset of
those supported by strftime(), but the libc function is not used to make the
output of the module stable and locale-independent.
This fixes issue #23.
This adds a new "fancyindex_hide_symlinks" configuration flag, which will
filter out symbolic links from the generated file listings when enabled.
Feature suggested by Peter Wemm (https://github.com/DarkHelmet433)
Fixes issue #27
If fancy indexing is used at the root of a webserver, it will still display
a "Parent Directory" link even when listing the webserver's root. This should
not happen as it outputs a useless link.
The fancyindex_footer and fancyindex_header settings need the standard Nginx
ngx_http_addition_module built into Nginx. Add a note to this effect in the
README.
Also, a warning is issued at configuration time if the addition module is not
enabled in the configuration.
Closes issue #26.