Created
December 11, 2013 23:21
-
-
Save arlando/7920365 to your computer and use it in GitHub Desktop.
Create a reverse proxy pass to your MongoHQ API with this Nginx config.
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
server { | |
access_log logs/api.log; | |
location /api/v1/ { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass https://api.mongohq.com/databases/blogv2/collections/posts/documents?_apikey=; | |
proxy_set_header Host api.mongohq.com; | |
proxy_connect_timeout 1; | |
proxy_next_upstream error timeout http_500 http_502 http_503 http_504 http_404; | |
proxy_intercept_errors on; | |
expires 30; | |
add_header Content-Type text/javascript; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment