Created
February 20, 2012 16:01
-
-
Save timhodson/1869847 to your computer and use it in GitHub Desktop.
Create an apache proxy with Kasabi apikey header injection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create an apache proxy with Kasabi apikey header injection | |
# Requests to http://127.0.0.1/kasabi will be forwarded and have the X-KASABI-APIKEY header set. | |
# e.g. | |
# http://127.0.0.1/kasabi/dataset/food/apis/search?query=fish | |
# will be forwarded to | |
# http://api.kasabi.com/dataset/food/apis/search?query=fish | |
# and responses will be passed back to the client | |
NameVirtualHost * | |
<VirtualHost *> | |
ProxyRequests Off | |
<Proxy http://127.0.0.1/*> | |
Allow from all | |
</Proxy> | |
<LocationMatch "/kasabi"> | |
ProxyPass http://api.kasabi.com/ | |
ProxyPassReverse http://api.kasabi.com/ | |
RequestHeader set X-KASABI-APIKEY "MySecretAPIKey" | |
</LocationMatch> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment