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/12/24 07:22:19 UTC

[GitHub] [apisix] yongboy opened a new issue #3117: The proxy-rewrite plugin does not support pass nginx's variable within header

yongboy opened a new issue #3117:
URL: https://github.com/apache/apisix/issues/3117


   ## Issue description
   
   I want to pass the nginx's [Embedded Variables](http://nginx.org/en/docs/http/ngx_http_core_module.html#variables) for upstream applications, below is my proxy-rewrite plugin's config:
   
   ```json
   {
       "headers": {
           "X-AUTH-UID": "$arg_uid"
       },
       "regex_uri": [
           "^/monitor/(.*)",
           "/$1"
       ]
   }
   ```
   
   The test url:
   
   ```
   curl http://gw.dev/monitor/hello?uid=10001
   ```
   
   The upstream application got the raw req info below: 
   
   ```
   GET /hello?uid=10001 HTTP/1.1
   Host: gw.dev
   X-Real-IP: 172.19.0.1
   X-Forwarded-For: 172.19.0.1
   X-Forwarded-Proto: http
   X-Forwarded-Host: gw.dev
   X-Forwarded-Port: 9080
   User-Agent: curl/7.64.1
   Accept: */*
   X-AUTH-UID: $arg_uid
   
   ......
   ```
   
   ## Environment
   
   * apisix version : 1.5
   * OS: MacOS
   * OpenRestyx / Nginx version: nginx/1.17.3
   


----------------------------------------------------------------
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] [apisix] BFergerson commented on issue #3117: The proxy-rewrite plugin does not support pass nginx's variable within header

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


   I believe I'm facing a similar issue. I am trying to use two plugins to create a sort of password-protected area in my application. I was hoping to use the basic-auth plugin for username/password functionality and proxy-rewrite to automatically add the username to the route. For example, rerouting requests to `host:3000` to `host:3000/{username}`.
   
   Is that similar to this issue and would it be solved with work done on this issue?


----------------------------------------------------------------
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] [apisix] spacewander commented on issue #3117: The proxy-rewrite plugin does not support pass nginx's variable within header

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


   Only constant value is supported.


----------------------------------------------------------------
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] [apisix] spacewander commented on issue #3117: The proxy-rewrite plugin does not support pass nginx's variable within header

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


   @BFergerson 
   It is another thing since the username is not exposed to `ctx.var` yet. You might need to open a new issue for 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.

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



[GitHub] [apisix] tokers closed issue #3117: The proxy-rewrite plugin does not support pass nginx's variable within header

Posted by GitBox <gi...@apache.org>.
tokers closed issue #3117:
URL: https://github.com/apache/apisix/issues/3117


   


----------------------------------------------------------------
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] [apisix] Firstsawyou commented on issue #3117: The proxy-rewrite plugin does not support pass nginx's variable within header

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


   Assigned to me.


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