mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-01 19:27:59 +00:00
Compare commits
6 Commits
v2.9.0-RC1
...
v2.9.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7a087ed4a | ||
|
|
c911be58f6 | ||
|
|
e23dda1df0 | ||
|
|
e8955454f7 | ||
|
|
6e0cf66008 | ||
|
|
6d305636a0 |
@@ -9,7 +9,7 @@ fullnameOverride: ""
|
||||
images:
|
||||
owsec:
|
||||
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owsec
|
||||
tag: v2.9.0-RC1
|
||||
tag: v2.9.0
|
||||
pullPolicy: Always
|
||||
# regcred:
|
||||
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
|
||||
|
||||
@@ -3092,6 +3092,20 @@ static std::string DefaultUCentralSchema = R"foo(
|
||||
}
|
||||
}
|
||||
},
|
||||
"metrics.wifi-scan": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"interval": {
|
||||
"type": "integer"
|
||||
},
|
||||
"verbose": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"information-elements": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"metrics.telemetry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3101,7 +3115,27 @@ static std::string DefaultUCentralSchema = R"foo(
|
||||
"types": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ssh",
|
||||
"health",
|
||||
"health.dns",
|
||||
"health.dhcp",
|
||||
"health.radius",
|
||||
"health.memory",
|
||||
"client",
|
||||
"client.join",
|
||||
"client.leave",
|
||||
"client.key-mismatch",
|
||||
"wifi",
|
||||
"wifi.start",
|
||||
"wifi.stop",
|
||||
"wired",
|
||||
"wired.carrier-up",
|
||||
"wired.carrier-down",
|
||||
"unit",
|
||||
"unit.boot-up"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3112,7 +3146,27 @@ static std::string DefaultUCentralSchema = R"foo(
|
||||
"types": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ssh",
|
||||
"health",
|
||||
"health.dns",
|
||||
"health.dhcp",
|
||||
"health.radius",
|
||||
"health.memory",
|
||||
"client",
|
||||
"client.join",
|
||||
"client.leave",
|
||||
"client.key-mismatch",
|
||||
"wifi",
|
||||
"wifi.start",
|
||||
"wifi.stop",
|
||||
"wired",
|
||||
"wired.carrier-up",
|
||||
"wired.carrier-down",
|
||||
"unit",
|
||||
"unit.boot-up"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3132,6 +3186,9 @@ static std::string DefaultUCentralSchema = R"foo(
|
||||
"dhcp-snooping": {
|
||||
"$ref": "#/$defs/metrics.dhcp-snooping"
|
||||
},
|
||||
"wifi-scan": {
|
||||
"$ref": "#/$defs/metrics.wifi-scan"
|
||||
},
|
||||
"telemetry": {
|
||||
"$ref": "#/$defs/metrics.telemetry"
|
||||
},
|
||||
|
||||
@@ -483,6 +483,7 @@ namespace OpenWifi {
|
||||
Response->set("Content-Transfer-Encoding", "binary");
|
||||
Response->set("Accept-Ranges", "bytes");
|
||||
}
|
||||
Response->set("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
Response->set("Content-Disposition", "attachment; filename=" + Name);
|
||||
Response->set("Accept-Ranges", "bytes");
|
||||
Response->set("Cache-Control", "no-store");
|
||||
@@ -491,7 +492,7 @@ namespace OpenWifi {
|
||||
Response->sendFile(TempAvatar.path(), MT.ContentType);
|
||||
}
|
||||
|
||||
inline void SendFileContent(const std::string &Content, const std::string &Type,
|
||||
inline void SendFileContent(const std::string &Content, [[maybe_unused]] const std::string &Type,
|
||||
const std::string &Name) {
|
||||
Response->setStatus(Poco::Net::HTTPResponse::HTTPStatus::HTTP_OK);
|
||||
SetCommonHeaders();
|
||||
@@ -500,12 +501,13 @@ namespace OpenWifi {
|
||||
Response->set("Content-Transfer-Encoding", "binary");
|
||||
Response->set("Accept-Ranges", "bytes");
|
||||
}
|
||||
Response->set("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
Response->set("Content-Disposition", "attachment; filename=" + Name);
|
||||
Response->set("Accept-Ranges", "bytes");
|
||||
Response->set("Cache-Control", "no-store");
|
||||
Response->set("Expires", "Mon, 26 Jul 2027 05:00:00 GMT");
|
||||
Response->setContentLength(Content.size());
|
||||
Response->setContentType(Type);
|
||||
Response->setContentType(MT.ContentType);
|
||||
auto &OutputStream = Response->send();
|
||||
OutputStream << Content;
|
||||
}
|
||||
|
||||
@@ -437,6 +437,15 @@ namespace OpenWifi::Utils {
|
||||
return MediaTypeEncoding{.Encoding = PLAIN, .ContentType = "text/css"};
|
||||
if (E == "js")
|
||||
return MediaTypeEncoding{.Encoding = PLAIN, .ContentType = "application/javascript"};
|
||||
if (E == "pcap")
|
||||
return MediaTypeEncoding{.Encoding = BINARY, .ContentType = "application/vnd.tcpdump.pcap"};
|
||||
if (E == "txt")
|
||||
return MediaTypeEncoding{.Encoding = PLAIN, .ContentType = "text/plain"};
|
||||
if (E == "tgz")
|
||||
return MediaTypeEncoding{.Encoding = BINARY, .ContentType = "application/tar+gzip"};
|
||||
if (E == "gz" || E=="gzip")
|
||||
return MediaTypeEncoding{.Encoding = BINARY, .ContentType = "application/gzip"};
|
||||
|
||||
return MediaTypeEncoding{.Encoding = BINARY, .ContentType = "application/octet-stream"};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user