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/27 04:04:02 UTC

[GitHub] [apisix] BFergerson opened a new issue #3133: Combining basic-auth & proxy-rewrite

BFergerson opened a new issue #3133:
URL: https://github.com/apache/apisix/issues/3133


   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, dynamically rerouting requests to `host:3000` to `host:3000/{username}`.
   
   Is this something that falls within the functionalities APISIX aims to cover? Is this something I can achieve with a custom plugin?


----------------------------------------------------------------
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] moonming closed issue #3133: Combining basic-auth & proxy-rewrite

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


   


----------------------------------------------------------------
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 commented on issue #3133: Combining basic-auth & proxy-rewrite

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


   It seems we cannot modify uri based on request headers.
   
   I think maybe we can expand the proxy-rewrite, PR's welcome!


----------------------------------------------------------------
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 #3133: Combining basic-auth & proxy-rewrite

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


   You may need to change proxy-rewrite like what we have done with fault-injection:
   https://github.com/apache/apisix/blob/53777519b8261994f34dfd67fc07cc1b97ba2946/apisix/plugins/fault-injection.lua#L85
   And use the `consumer_name` as variable name. See:
   https://github.com/apache/apisix/blob/53777519b8261994f34dfd67fc07cc1b97ba2946/apisix/core/ctx.lua#L174-L175


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