Skip to content

Instantly share code, notes, and snippets.

@actuosus
Created January 24, 2014 14:51
Show Gist options
  • Save actuosus/8598714 to your computer and use it in GitHub Desktop.
Save actuosus/8598714 to your computer and use it in GitHub Desktop.
nginx request slowdown.
http {
# ...
server {
listen 8081;
server_name localhost;
location / {
proxy_pass http://localhost:8000/;
proxy_buffering on;
# if ($http_x_requested_with = XMLHttpRequest) {
limit_rate 5k;
# }
}
location ^~ /static/ {
# limit_rate_after 1m;
limit_rate 200k;
proxy_pass http://localhost:8000/static/;
proxy_buffering on;
}
}
# ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment