AlinsRan commented on PR #13803:
URL: https://github.com/apache/apisix/pull/13803#issuecomment-5261613772

   Follow-up on the naming, which turns this into a cleaner answer to your 
point than my last reply gave.
   
   The preserved values are now named after the fields they replace:
   
   ```nginx
   set $original_x_forwarded_proto $http_x_forwarded_proto;
   set $original_x_forwarded_host  $http_x_forwarded_host;
   set $original_x_forwarded_port  $http_x_forwarded_port;
   set $original_x_forwarded_for   $http_x_forwarded_for;
   set $original_forwarded         $http_forwarded;
   ```
   
   Those are the names the values were already kept under as 
`ctx.var.original_x_forwarded_*`, so `ctx.var` resolves them to the NGINX 
variables and **a plugin reading the old names keeps working unchanged**. There 
is no rename to migrate and no compatibility field to retain separately — TEST 
17 now reads `ctx.var.original_x_forwarded_for` and passes.
   
   The values are also strictly more available than before: the Lua fields were 
only written for an untrusted peer, while the configuration writes them for 
every request, and they can now be named in an access log format as well.
   
   (The vendor prefix went too — nothing else in `ngx_tpl.lua` carries one.)


-- 
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