0
@@ -21,6 +21,7 @@ static VALUE global_request_uri;
0
static VALUE global_server_port;
0
static VALUE global_content_length;
0
static VALUE global_content_type;
0
+static VALUE global_http_client_ip;
0
static VALUE global_http_prefix;
0
static VALUE global_http_version;
0
@@ -173,6 +174,9 @@ VALUE client_env(VALUE _, VALUE rb_client)
0
if(client->server->port)
0
rb_hash_aset(env, global_server_port, rb_str_new2(client->server->port));
0
+ rb_hash_aset(env, global_http_client_ip, rb_str_new2(client->ip));
0
rb_hash_aset(env, global_path_info, rb_hash_aref(env, global_request_path));
0
@@ -253,6 +257,7 @@ void Init_ebb_ext()
0
DEF_GLOBAL(request_path, "REQUEST_PATH");
0
DEF_GLOBAL(request_uri, "REQUEST_URI");
0
DEF_GLOBAL(server_port, "SERVER_PORT");
0
+ DEF_GLOBAL(http_client_ip, "HTTP_CLIENT_IP");
0
DEF_GLOBAL(http_prefix, "HTTP_");
0
DEF_GLOBAL(http_version, "HTTP_VERSION");
Comments
No one has commented yet.