Skip to content

Commit

Permalink
Add extra_mime_types option (Issue #17)
Browse files Browse the repository at this point in the history
  • Loading branch information
cztomczak committed Apr 1, 2016
1 parent 784291b commit 7de2205
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion phpdesktop-chrome47/web_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,18 @@ bool StartWebServer() {
}
LOG_INFO << "CGI environment variables set: " << cgiEnvironment;

// Mongoose web server.
// Listening ports
std::string listening_ports;
if (ipAddress == "*") {
listening_ports = port;
} else {
listening_ports = ipAddress + ":" + port;
}

// Extra mime types
std::string extra_mime_types = (*appSettings)["web_server"]["extra_mime_types"];

// Mongoose C options
const char* options[] = {
"document_root", wwwDirectory.c_str(),
"listening_ports", listening_ports.c_str(),
Expand All @@ -179,6 +184,7 @@ bool StartWebServer() {
"cgi_environment", cgiEnvironment.c_str(),
"404_handler", _404_handler.c_str(),
"hide_files_patterns", hide_files_patterns.c_str(),
"extra_mime_types", extra_mime_types.c_str(),
NULL
};

Expand Down

0 comments on commit 7de2205

Please sign in to comment.