You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/09 03:27:53 UTC

[GitHub] [apisix] nic-chen opened a new issue, #7215: bug: `X-Forwarded-Proto` header should not be set for upstream as a table

nic-chen opened a new issue, #7215:
URL: https://github.com/apache/apisix/issues/7215

   ### Current Behavior
   
   `X-Forwarded-Proto` header for upstream has been set as a table
   
   ### Expected Behavior
   
   `X-Forwarded-Proto` header for upstream should be set as a string
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   1. create a simple route:
   ```shell
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "uri": "/test",
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "127.0.0.1:8080": 1
           }
       }
   }'
   ```
   
   2. visit the route:
   ```shell
   curl 127.0.0.1:9080/test -H "X-Forwarded-Proto: http" -H "X-Test: test"  -H "X-Forwarded-Proto: http" -H "X-Test: test"
   ```
   
   3. the upstream will receive:
   ```shell
   k: User-Agent, v: [curl/7.64.1]
   k: X-Forwarded-For, v: [127.0.0.1]
   k: X-Forwarded-Port, v: [9080]
   k: X-Forwarded-Proto, v: [table: 0x1b70daa8]
   k: X-Forwarded-Host, v: [127.0.0.1]
   k: Accept, v: [*/*]
   k: X-Test, v: [test test]
   k: X-Real-Ip, v: [127.0.0.1]
   ```
   
   
   see: 
   https://github.com/apache/apisix/blob/master/apisix/init.lua#L230-L233
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): master branch
   - Operating system (run `uname -a`): Darwin Kernel Version 19.6.0
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] soulbird commented on issue #7215: bug: `X-Forwarded-Proto` header should not be set for upstream as a table

Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #7215:
URL: https://github.com/apache/apisix/issues/7215#issuecomment-1150730971

   Thanks for reporting this issue. I will fix it. 


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander closed issue #7215: bug: `X-Forwarded-Proto` header should not be set for upstream as a table

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #7215: bug: `X-Forwarded-Proto` header should not be set for upstream as a table
URL: https://github.com/apache/apisix/issues/7215


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org