Fix propagation of fancyindex_css_href configuration directive
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.pull/28/head
parent
5549286d39
commit
3f93d1f01d
|
@ -12,6 +12,9 @@ All notable changes to this project will be documented in this file.
|
||||||
### Changed
|
### Changed
|
||||||
- Listings in top-level directories will not generate a "Parent Directory"
|
- Listings in top-level directories will not generate a "Parent Directory"
|
||||||
link as first element of the listing. (Patch by Thomas P.)
|
link as first element of the listing. (Patch by Thomas P.)
|
||||||
|
### Fixed
|
||||||
|
- Fix propagation and overriding of the `fancyindex_css_href` setting inside
|
||||||
|
nested locations.
|
||||||
|
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -1334,7 +1334,8 @@ ngx_http_fancyindex_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
|
||||||
|
|
||||||
ngx_conf_merge_str_value(conf->header, prev->header, "");
|
ngx_conf_merge_str_value(conf->header, prev->header, "");
|
||||||
ngx_conf_merge_str_value(conf->footer, prev->footer, "");
|
ngx_conf_merge_str_value(conf->footer, prev->footer, "");
|
||||||
ngx_conf_merge_str_value(conf->time_format, prev->time_format, "%Y-%b-%d %H:%S");
|
ngx_conf_merge_str_value(conf->css_href, prev->css_href, "");
|
||||||
|
ngx_conf_merge_str_value(conf->time_format, prev->time_format, "%Y-%b-%d %H:%M");
|
||||||
|
|
||||||
ngx_conf_merge_ptr_value(conf->ignore, prev->ignore, NULL);
|
ngx_conf_merge_ptr_value(conf->ignore, prev->ignore, NULL);
|
||||||
ngx_conf_merge_value(conf->hide_symlinks, prev->hide_symlinks, 0);
|
ngx_conf_merge_value(conf->hide_symlinks, prev->hide_symlinks, 0);
|
||||||
|
|
Loading…
Reference in New Issue