summaryrefslogtreecommitdiff
path: root/include/webassets.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2017-10-25 03:04:52 +0300
committerEd Tanous <ed.tanous@intel.com>2017-10-25 03:10:33 +0300
commit710adfcf07d73b00a9bb6f8bf977cdb0897fa4b8 (patch)
tree15b50e4a242788ad4d6ce385cf2e7111c477535c /include/webassets.hpp
parentba9f9a6cebfbb7a12ecf869afa0cdc5aef9c8372 (diff)
downloadbmcweb-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.hpp8
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,