diff options
author | Ed Tanous <ed.tanous@intel.com> | 2017-10-25 03:04:52 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2017-10-25 03:10:33 +0300 |
commit | 710adfcf07d73b00a9bb6f8bf977cdb0897fa4b8 (patch) | |
tree | 15b50e4a242788ad4d6ce385cf2e7111c477535c /include/webassets.hpp | |
parent | ba9f9a6cebfbb7a12ecf869afa0cdc5aef9c8372 (diff) | |
download | bmcweb-710adfcf07d73b00a9bb6f8bf977cdb0897fa4b8.tar.xz |
Add the redfish static files to the build
...And delete the old webserver static files from the repo.
Move $metadata to a static file, as that's really where it belongs.
Change-Id: I2caeee7cd779b7c07cfc10cd693459105656671f
Diffstat (limited to 'include/webassets.hpp')
-rw-r--r-- | include/webassets.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/webassets.hpp b/include/webassets.hpp index 7845d712ad..3afa61f6f0 100644 --- a/include/webassets.hpp +++ b/include/webassets.hpp @@ -78,6 +78,14 @@ void request_routes(Crow<Middlewares...>& app) { auto content_type_it = content_types.find(webpath.extension().c_str()); if (content_type_it != content_types.end()) { content_type = content_type_it->second; + } else { + if (webpath.string() == "$metadata"){ + content_type_it = content_types.find(".xml"); + // should always be true + if (content_type_it != content_types.end()) { + content_type = content_type_it->second; + } + } } app.route_dynamic(std::string(webpath.string()))( [is_gzip, absolute_path_str, content_type](const crow::request& req, |