comparison src/http/ngx_http_core_module.h @ 4623:ed3d0cc6de5a

New function ngx_http_get_forwarded_addr() to look up real client address. On input it takes an original address, string in the X-Forwarded-For format and its length, list of trusted proxies, and a flag indicating to perform the recursive search. On output it returns NGX_OK and the "deepest" valid address in a chain, or NGX_DECLINED. It supports AF_INET and AF_INET6. Additionally, original address and/or proxy may be specified as AF_UNIX.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 14 May 2012 12:27:41 +0000
parents b4379a91f9b5
children 4a18bf1833a9
comparison
equal deleted inserted replaced
4622:0dfdc3f732cb 4623:ed3d0cc6de5a
510 ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *chain); 510 ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *chain);
511 511
512 512
513 ngx_int_t ngx_http_set_disable_symlinks(ngx_http_request_t *r, 513 ngx_int_t ngx_http_set_disable_symlinks(ngx_http_request_t *r,
514 ngx_http_core_loc_conf_t *clcf, ngx_str_t *path, ngx_open_file_info_t *of); 514 ngx_http_core_loc_conf_t *clcf, ngx_str_t *path, ngx_open_file_info_t *of);
515
516 ngx_int_t ngx_http_get_forwarded_addr(ngx_http_request_t *r, ngx_addr_t *addr,
517 u_char *xff, size_t xfflen, ngx_array_t *proxies, int recursive);
515 518
516 519
517 extern ngx_module_t ngx_http_core_module; 520 extern ngx_module_t ngx_http_core_module;
518 521
519 extern ngx_uint_t ngx_http_max_module; 522 extern ngx_uint_t ngx_http_max_module;