http access事件新增文件绝对路径参数

This commit is contained in:
xia-chu
2026-03-09 18:00:12 +08:00
parent d3bf11b4ee
commit ca47a1f8b2
5 changed files with 9 additions and 8 deletions

View File

@@ -783,7 +783,7 @@ void installWebHook() {
// The purpose of tracking users is to cache the last authentication result, reduce the number of authentication times, and improve performance
NoticeCenter::Instance().addListener(&web_hook_tag, Broadcast::kBroadcastHttpAccess, [](BroadcastHttpAccessArgs) {
#if defined(ENABLE_PYTHON)
if (PythonInvoker::Instance().on_http_access(parser, path, is_dir, invoker, sender)) {
if (PythonInvoker::Instance().on_http_access(parser, path, file_path, is_dir, invoker, sender)) {
return;
}
#endif
@@ -806,6 +806,7 @@ void installWebHook() {
body["port"] = sender.get_peer_port();
body["id"] = sender.getIdentifier();
body["path"] = path;
body["file_path"] = file_path;
body["is_dir"] = is_dir;
body["params"] = parser.params();
for (auto &pr : parser.getHeader()) {