1
0
Fork 0

httpd: expose the aircraft dir to the web server

add a (currently) hard coded url rewrite to access the
currently used aircraft by
http://localhost:8080/aircraft-dir/
This commit is contained in:
Torsten Dreyer 2014-09-10 22:43:06 +02:00
parent 48180eb9ab
commit b50b1a778b

View file

@ -478,6 +478,7 @@ void MongooseHttpd::init()
// build url rewrites relative to fg-root
string rewrites = n->getStringValue("url-rewrites", "");
string_list rwl = simgear::strutils::split(rewrites, ",");
rwl.push_back(string("/aircraft-dir/=") + fgGetString("/sim/aircraft-dir") + "/" );
rewrites.clear();
for (string_list::iterator it = rwl.begin(); it != rwl.end(); ++it) {
string_list rw_entries = simgear::strutils::split(*it, "=");