Software / code / prosody
Comparison
plugins/mod_http_files.lua @ 7977:01d6298de991
plugins/various: Use type-specific config API
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 16 Mar 2017 20:46:06 +0100 |
| parent | 7491:491975f5d383 |
| child | 7978:01aa6344a556 |
comparison
equal
deleted
inserted
replaced
| 7976:2a7ef5fcaa77 | 7977:01d6298de991 |
|---|---|
| 17 local path_sep = package.config:sub(1,1); | 17 local path_sep = package.config:sub(1,1); |
| 18 | 18 |
| 19 local base_path = module:get_option_string("http_files_dir", module:get_option_string("http_path")); | 19 local base_path = module:get_option_string("http_files_dir", module:get_option_string("http_path")); |
| 20 local cache_size = module:get_option_number("http_files_cache_size", 128); | 20 local cache_size = module:get_option_number("http_files_cache_size", 128); |
| 21 local cache_max_file_size = module:get_option_number("http_files_cache_max_file_size", 4096); | 21 local cache_max_file_size = module:get_option_number("http_files_cache_max_file_size", 4096); |
| 22 local dir_indices = module:get_option("http_index_files", { "index.html", "index.htm" }); | 22 local dir_indices = module:get_option_array("http_index_files", { "index.html", "index.htm" }); |
| 23 local directory_index = module:get_option_boolean("http_dir_listing"); | 23 local directory_index = module:get_option_boolean("http_dir_listing"); |
| 24 | 24 |
| 25 local mime_map = module:shared("/*/http_files/mime").types; | 25 local mime_map = module:shared("/*/http_files/mime").types; |
| 26 if not mime_map then | 26 if not mime_map then |
| 27 mime_map = { | 27 mime_map = { |