Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions plugins/in_http/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,18 @@ static struct flb_config_map config_map[] = {
NULL
},

{
FLB_CONFIG_MAP_BOOL, "add_remote_addr", "false",
0, FLB_TRUE, offsetof(struct flb_http, add_remote_addr),
"Adds REMOTE_ADDR field to the record. The value of REMOTE_ADDR is the client's address."
},

{
FLB_CONFIG_MAP_STR, "remote_addr_key", REMOTE_ADDR_KEY,
0, FLB_TRUE, offsetof(struct flb_http, remote_addr_key),
"Key name for the remote address field added to the record."
},

{
FLB_CONFIG_MAP_SIZE, "buffer_max_size", HTTP_BUFFER_MAX_SIZE,
0, FLB_TRUE, offsetof(struct flb_http, buffer_max_size),
Expand Down
4 changes: 4 additions & 0 deletions plugins/in_http/http.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#define HTTP_BUFFER_MAX_SIZE "4M"
#define HTTP_BUFFER_CHUNK_SIZE "512K"
#define REMOTE_ADDR_KEY "REMOTE_ADDR"

struct flb_http {
int successful_response_code;
Expand All @@ -47,6 +48,9 @@ struct flb_http {

struct flb_input_instance *ins;

int add_remote_addr;
const char *remote_addr_key;

/* New gen HTTP server */
int enable_http2;
struct flb_http_server http_server;
Expand Down
Loading
Loading