mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-06 05:37:49 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -3,23 +3,23 @@
|
||||
//
|
||||
|
||||
#include "RESTAPI_asset_server.h"
|
||||
#include "Daemon.h"
|
||||
#include "Poco/File.h"
|
||||
#include "framework/ow_constants.h"
|
||||
#include "Daemon.h"
|
||||
|
||||
namespace OpenWifi {
|
||||
void RESTAPI_asset_server::DoGet() {
|
||||
Poco::File AssetFile;
|
||||
void RESTAPI_asset_server::DoGet() {
|
||||
Poco::File AssetFile;
|
||||
|
||||
if(Request->getURI().find("/favicon.ico") != std::string::npos) {
|
||||
AssetFile = Daemon()->AssetDir() + "/favicon.ico";
|
||||
} else {
|
||||
std::string AssetName = GetBinding(RESTAPI::Protocol::ID, "");
|
||||
AssetFile = Daemon()->AssetDir() + "/" + AssetName;
|
||||
}
|
||||
if(!AssetFile.isFile()) {
|
||||
return NotFound();
|
||||
}
|
||||
SendFile(AssetFile);
|
||||
}
|
||||
}
|
||||
if (Request->getURI().find("/favicon.ico") != std::string::npos) {
|
||||
AssetFile = Daemon()->AssetDir() + "/favicon.ico";
|
||||
} else {
|
||||
std::string AssetName = GetBinding(RESTAPI::Protocol::ID, "");
|
||||
AssetFile = Daemon()->AssetDir() + "/" + AssetName;
|
||||
}
|
||||
if (!AssetFile.isFile()) {
|
||||
return NotFound();
|
||||
}
|
||||
SendFile(AssetFile);
|
||||
}
|
||||
} // namespace OpenWifi
|
||||
Reference in New Issue
Block a user