Skip to content

Instantly share code, notes, and snippets.

@arlando
Created December 11, 2013 23:21
Show Gist options
  • Save arlando/7920365 to your computer and use it in GitHub Desktop.
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.
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