comparison realip.t @ 1355:afe541649054

Tests: fixed realip.t with parallel tests. Testing $server_port to be 8081 as added in c0075a0a2ba9 is wrong, since with parallel tests real port number may be different.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 05 Jul 2018 22:19:17 +0300
parents c0075a0a2ba9
children
comparison
equal deleted inserted replaced
1354:c0075a0a2ba9 1355:afe541649054
39 set_real_ip_from 127.0.0.1/32; 39 set_real_ip_from 127.0.0.1/32;
40 set_real_ip_from 10.0.1.0/24; 40 set_real_ip_from 10.0.1.0/24;
41 41
42 server { 42 server {
43 listen 127.0.0.1:8080; 43 listen 127.0.0.1:8080;
44 listen 127.0.0.1:8081;
45 server_name localhost; 44 server_name localhost;
46
47 if ($server_port = 8081) {
48 return 204;
49 }
50 45
51 location / { } 46 location / { }
52 location /custom { 47 location /custom {
53 real_ip_header X-Real-IP-Custom; 48 real_ip_header X-Real-IP-Custom;
54 } 49 }
60 55
61 location /2 { 56 location /2 {
62 real_ip_header X-Forwarded-For; 57 real_ip_header X-Forwarded-For;
63 real_ip_recursive on; 58 real_ip_recursive on;
64 } 59 }
60 }
61
62 server {
63 listen 127.0.0.1:8081;
64 server_name localhost;
65
66 return 204;
65 } 67 }
66 } 68 }
67 69
68 EOF 70 EOF
69 71