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 2020/07/01 16:31:26 UTC

[GitHub] [incubator-apisix] poidl opened a new issue #1792: bug: docs "Add a prefix to the route" possibly missing host proxy rewrite

poidl opened a new issue #1792:
URL: https://github.com/apache/incubator-apisix/issues/1792


   ### Issue description
   
   I'm a beginner and just installed it. I went through the Getting Started and in "Add a prefix to the route" it says
   
   > Now lets say you want to add a prefix (eg: samplePrefix) to the route **and do not want to use the host header** then you can use the proxy rewrite plugin to do it.
   
   below is the following code:
   
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/samplePrefix/get",
       "plugins": {
           "proxy-rewrite": {
             "scheme": "https",
             "regex_uri": ["^/samplePrefix/get(.*)", "/get$1"]
           },
           "key-auth": {}
       },
       "upstream_id": 50
   }'
   ```
   I think there is a `"host":"httpbin.org"` missing, at least this fixed it for me. Otherwise I had to include the host header in curl.
   
   https://github.com/apache/incubator-apisix/blob/master/doc/getting-started.md#add-a-prefix-to-the-route
   
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.4
   * OS: Arch Linux 5.7.5-arch1-1
   
   ### Minimal test code / Steps to reproduce the issue
   N/A
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   N/A
   
   
   
   ### What's the expected result?
   N/A
   


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

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



[GitHub] [incubator-apisix] poidl closed issue #1792: bug: docs "Add a prefix to the route" possibly missing host proxy rewrite

Posted by GitBox <gi...@apache.org>.
poidl closed issue #1792:
URL: https://github.com/apache/incubator-apisix/issues/1792


   


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

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



[GitHub] [incubator-apisix] poidl commented on issue #1792: bug: docs "Add a prefix to the route" possibly missing host proxy rewrite

Posted by GitBox <gi...@apache.org>.
poidl commented on issue #1792:
URL: https://github.com/apache/incubator-apisix/issues/1792#issuecomment-652595954


   Sorry I tried it again and everything works as described in the docs! Thanks!


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

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