diff --git a/ngx_http_geoip2_module.c b/ngx_http_geoip2_module.c index 8ace9c0..d4e4d41 100644 --- a/ngx_http_geoip2_module.c +++ b/ngx_http_geoip2_module.c @@ -213,10 +213,9 @@ not_found: v->valid = 1; v->no_cacheable = 0; v->not_found = 0; - - return NGX_OK; + } else { + v->not_found = 1; } - v->not_found = 1; return NGX_OK; }