]> git.mxchange.org Git - flightgear.git/commitdiff
httpd: expose the aircraft dir to the web server
authorTorsten Dreyer <Torsten@t3r.de>
Wed, 10 Sep 2014 20:43:06 +0000 (22:43 +0200)
committerTorsten Dreyer <Torsten@t3r.de>
Wed, 10 Sep 2014 20:43:06 +0000 (22:43 +0200)
add a (currently) hard coded url rewrite to access the
currently used aircraft by
http://localhost:8080/aircraft-dir/

src/Network/http/httpd.cxx

index 881ce51706787e0fae583dda029dc530184b17cf..cc79f3dee1846460dada2320b3f18f517f746f31 100644 (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, "=");