mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 05:08:26 +00:00
[API] Implement Zone Sidecar (#3635)
* Zone sidecar work * Process management work * Merge * Sidecar work * API config option * Request proxy work * Proxy headers and params * Change port * Remove code * Sim work * Sidecar work * Update loot_simulator_controller.cpp * Update loot_simulator_controller.cpp * Formatting * Post merge change * Windows compile fix * Update sidecar_api.cpp * Update strings.cpp
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
void SidecarApi::RequestLogHandler(const httplib::Request &req, const httplib::Response &res)
|
||||
{
|
||||
if (!req.path.empty()) {
|
||||
std::vector<std::string> params;
|
||||
for (auto &p: req.params) {
|
||||
params.emplace_back(fmt::format("{}={}", p.first, p.second));
|
||||
}
|
||||
|
||||
LogInfo(
|
||||
"[API] Request [{}] [{}{}] via [{}:{}]",
|
||||
res.status,
|
||||
req.path,
|
||||
(!params.empty() ? "?" + Strings::Join(params, "&") : ""),
|
||||
req.remote_addr,
|
||||
req.remote_port
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user