Add enable_dirlist to mg_http_serve_opts

This commit is contained in:
Sergey Lyubka committed 2021-07-20 17:22:41 +01:00
1 parent 824e33ef8a
commit 8fc94e12af
7 files changed
+41 -13

No files matched your search

+2 -1
View File
@@ -20,7 +20,8 @@ static void signal_handler(int signo) {
// Simply serve static files from `s_root_dir`
static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_HTTP_MSG) {
struct mg_http_serve_opts opts = {s_root_dir, s_ssi_pattern, NULL};
struct mg_http_serve_opts opts = {.root_dir = s_root_dir,
.ssi_pattern = s_ssi_pattern};
mg_http_serve_dir(c, ev_data, &opts);
}
(void) fn_data;