3 t_plan
5 "trust_x_forwarded=true configuration test"
5 t_begin
"setup and start" && {
7 echo "trust_x_forwarded true " >> $unicorn_config
8 unicorn
-D -c $unicorn_config env.ru
12 t_begin
"spoofed request with X-Forwarded-Proto sets 'https'" && {
13 curl
-H 'X-Forwarded-Proto: https' http
://$listen/ | \
14 grep -F '"rack.url_scheme"=>"https"'
17 t_begin
"spoofed request with X-Forwarded-SSL sets 'https'" && {
18 curl
-H 'X-Forwarded-SSL: on' http
://$listen/ | \
19 grep -F '"rack.url_scheme"=>"https"'
22 t_begin
"killing succeeds" && {
26 t_begin
"check stderr has no errors" && {