1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-03 00:14:23 +00:00

Use post and add ip addr and user agent (#719)

* Use post and add ip addr and user agent

* Go add ip addr and user agent

* Adjust gc unit test

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2024-11-25 15:59:24 +08:00
committed by GitHub
parent 516eac3304
commit aaa7819c34
8 changed files with 118 additions and 42 deletions

View File

@@ -609,8 +609,9 @@ send_statistic_msg (const char *repo_id, char *user, char *operation, guint64 by
}
char *
get_client_ip_addr (evhtp_request_t *req)
get_client_ip_addr (void *data)
{
evhtp_request_t *req = data;
const char *xff = evhtp_kv_find (req->headers_in, "X-Forwarded-For");
if (xff) {
struct in_addr addr;