Skip to content

Commit

Permalink
Realip: detect duplicate real_ip_header directive.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdocguard committed May 23, 2016
1 parent 06176bc commit adfd0b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/http/modules/ngx_http_realip_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ ngx_http_realip(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)

ngx_str_t *value;

if (rlcf->type != NGX_CONF_UNSET_UINT) {
return "is duplicate";
}

value = cf->args->elts;

if (ngx_strcmp(value[1].data, "X-Real-IP") == 0) {
Expand Down

0 comments on commit adfd0b0

Please sign in to comment.