view auto/lib/make @ 6729:cecf415643d7

Realip: fixed duplicate processing on redirects (ticket #1098). Duplicate processing was possible if the address set by realip was listed in set_realip_from, and there was an internal redirect so module context was cleared. This resulted in exactly the same address being set, so this wasn't a problem before the $realip_remote_addr variable was introduced, though now results in incorrect $realip_remote_addr being picked. Fix is to use ngx_http_realip_get_module_ctx() to look up module context even if it was cleared. Additionally, the order of checks was switched to check the configuration first as it looks more effective.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 06 Oct 2016 23:16:05 +0300
parents 9eefb38f0005
children
line wrap: on
line source


# Copyright (C) Igor Sysoev
# Copyright (C) Nginx, Inc.


if [ $PCRE != NONE -a $PCRE != NO -a $PCRE != YES ]; then
    . auto/lib/pcre/make
fi

if [ $OPENSSL != NONE -a $OPENSSL != NO -a $OPENSSL != YES ]; then
    . auto/lib/openssl/make
fi

if [ $ZLIB != NONE -a $ZLIB != NO -a $ZLIB != YES ]; then
    . auto/lib/zlib/make
fi

if [ $NGX_LIBATOMIC != NO -a $NGX_LIBATOMIC != YES ]; then
    . auto/lib/libatomic/make
fi

if [ $USE_PERL != NO ]; then
    . auto/lib/perl/make
fi