Forum: NGINX Proxying requests based on $http_authorization (API Key)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 justin (Guest)
on 2013-08-19 21:56
(Received via mailing list)
Hello.

We are looking to proxy requests to different backends using upstream
based
on http basic auth. I.E. the API key of the request. I am thinking I
need to
first get the API key from the raw http request ($http_authorization).
Then
do a lookup in redis for the backend to forward too.

We are already using OpenResty. Can we do this natively, or even better
yet,
are there 3rd party modules we can utilize to help with this? Is using
lua
required, or can we utilize standard nginx directives?

Thanks for the help, and insights.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,242036,242036#msg-242036
This topic is locked and can not be replied to.