Remove MG_ENABLE_DIRLIST, add mg_http_serve_opts :: enable_dir_listing

This commit is contained in:
cpq committed 2026-09-26 15:40:43 +01:00
1 parent 789372c5b3
commit a419e16f26
12 files changed
+47 -83

No files matched your search

+3 -2
View File
@@ -48,8 +48,9 @@ static void http_ev_handler(struct mg_connection *c, int ev, void *ev_data) {
} else if (mg_match(hm->uri, mg_str("/files/#"), NULL)) {
struct mg_http_serve_opts opts = {
.root_dir = "/files/=/fs/",
.allow_delete = true,
.allow_upload = true,
.enable_delete = true,
.enable_upload = true,
.enable_dir_listing = true,
};
mg_http_serve_dir(c, hm, &opts);
} else {