AlinsRan commented on code in PR #13348:
URL: https://github.com/apache/apisix/pull/13348#discussion_r3237151617


##########
t/APISIX.pm:
##########
@@ -224,6 +224,43 @@ $grpc_location .= <<_EOC_;
         }
 _EOC_
 
+my $disable_proxy_buffering_location = <<_EOC_;
+        location \@disable_proxy_buffering {
+            access_by_lua_block {
+                apisix.disable_proxy_buffering_access_phase()
+            }
+
+            proxy_http_version 1.1;
+            proxy_set_header   Host              \$upstream_host;
+            proxy_set_header   Upgrade           \$upstream_upgrade;
+            proxy_set_header   Connection        \$upstream_connection;
+            proxy_set_header   X-Real-IP         \$remote_addr;
+            proxy_pass_header  Date;
+
+            proxy_set_header   X-Forwarded-For      
\$proxy_add_x_forwarded_for;
+            proxy_set_header   X-Forwarded-Proto    \$var_x_forwarded_proto;
+            proxy_set_header   X-Forwarded-Host     \$var_x_forwarded_host;
+            proxy_set_header   X-Forwarded-Port     \$var_x_forwarded_port;
+
+            proxy_pass         
\$upstream_scheme://apisix_backend\$upstream_uri;
+            mirror             /proxy_mirror;

Review Comment:
   In the test template, `location = /proxy_mirror` is always defined 
unconditionally (it's not guarded by any condition), and the standard HTTP 
proxy location in `t/APISIX.pm` also always has `mirror /proxy_mirror;` without 
condition. Having the same unconditional directive in 
`@disable_proxy_buffering` is internally consistent with the existing test 
template behavior. No change needed here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to