From b50b1a778b9b42f7c0c28abcd600536653a8fbcc Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Wed, 10 Sep 2014 22:43:06 +0200 Subject: [PATCH] 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/ --- src/Network/http/httpd.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Network/http/httpd.cxx b/src/Network/http/httpd.cxx index 881ce5170..cc79f3dee 100644 --- a/src/Network/http/httpd.cxx +++ b/src/Network/http/httpd.cxx @@ -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, "=");