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

   ### Current Behavior
   
   ```
   curl --location --request PUT 
'http://apisix-admin:9180/apisix/admin/routes/redirect' \
   --header 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
   --header 'Content-Type: application/json' \
   --data-raw '{
       "host": "redirect",
       "uri": "/*",
       "upstream": {
           "type": "roundrobin",
           "nodes": [
               {
                   "host": "httpbin",
                   "port": 80,
                   "weight": 1
               }
           ]
       },
       "plugins": {
           "redirect": {
               "http_to_https": true,
               "append_query_string": true
           }
       },
       "name": "redirect"
   }'
   ```
   
   ```
   ❯ curl --noproxy '*' http://apisix-gateway/ip\?hello\=world -H "Host: 
redirect" -v
   *   Trying 10.98.108.144:80...
   * TCP_NODELAY set
   * Connected to apisix-gateway (10.98.108.144) port 80 (#0)
   > GET /ip?hello=world HTTP/1.1
   > Host: redirect
   > User-Agent: curl/7.68.0
   > Accept: */*
   > 
   * Mark bundle as not supporting multiuse
   < HTTP/1.1 301 Moved Permanently
   < Date: Wed, 06 Jul 2022 08:21:16 GMT
   < Content-Type: text/html
   < Content-Length: 166
   < Connection: keep-alive
   < Location: https://redirect/ip?hello=world&hello=world
   < Server: APISIX/2.13.1
   < 
   <html>
   <head><title>301 Moved Permanently</title></head>
   <body>
   <center><h1>301 Moved Permanently</h1></center>
   <hr><center>openresty</center>
   </body>
   </html>
   * Connection #0 to host apisix-gateway left intact
   
   ```
   
   ### Expected Behavior
   
   Tell the user in the documentation not to use both `http_to_https` and 
`append_query_string` options, or that apisix automatically handles not 
repeating the query string when both options are configured at the same time
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   /
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.13.1
   - Operating system (run `uname -a`): Linux apisix-fbf6b9dc-vkhx9 
5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 16:49:16 UTC 2022 x86_64 Linux


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