Skip to content

Commit 7de2205

Browse files
committed
Add extra_mime_types option (Issue #17)
1 parent 784291b commit 7de2205

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

phpdesktop-chrome47/web_server.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,18 @@ bool StartWebServer() {
163163
}
164164
LOG_INFO << "CGI environment variables set: " << cgiEnvironment;
165165

166-
// Mongoose web server.
166+
// Listening ports
167167
std::string listening_ports;
168168
if (ipAddress == "*") {
169169
listening_ports = port;
170170
} else {
171171
listening_ports = ipAddress + ":" + port;
172172
}
173+
174+
// Extra mime types
175+
std::string extra_mime_types = (*appSettings)["web_server"]["extra_mime_types"];
176+
177+
// Mongoose C options
173178
const char* options[] = {
174179
"document_root", wwwDirectory.c_str(),
175180
"listening_ports", listening_ports.c_str(),
@@ -179,6 +184,7 @@ bool StartWebServer() {
179184
"cgi_environment", cgiEnvironment.c_str(),
180185
"404_handler", _404_handler.c_str(),
181186
"hide_files_patterns", hide_files_patterns.c_str(),
187+
"extra_mime_types", extra_mime_types.c_str(),
182188
NULL
183189
};
184190

0 commit comments

Comments
 (0)