Skip to content

Instantly share code, notes, and snippets.

View jlien-calwater's full-sized avatar

Justin Lien jlien-calwater

View GitHub Profile
@jlien-calwater
jlien-calwater / ratelimit.nginxconf
Created November 2, 2015 16:31 — forked from ipmb/ratelimit.nginxconf
Nginx reverse proxy with rate limiting
upstream myapp {
server 127.0.0.1:8081;
}
limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s;
server {
listen 443 ssl spdy;
server_name _;
@jlien-calwater
jlien-calwater / nginx.conf
Last active September 14, 2015 20:39 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your location block(s):
#
# include cors_support;
#
# A limitation to this method is that Nginx doesn't currently send headers