Skip to content

Instantly share code, notes, and snippets.

@leandromoreira
Created January 26, 2019 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leandromoreira/16cbdc6d1bfe4c60d44dee675e33cd2a to your computer and use it in GitHub Desktop.
Save leandromoreira/16cbdc6d1bfe4c60d44dee675e33cd2a to your computer and use it in GitHub Desktop.
events {
worker_connections 1024;
}
error_log stderr;
http {
limit_req_zone $arg_token zone=mylimit:10m rate=1r/m;
server {
listen 8080;
location /api0 {
default_type 'text/plain';
limit_req zone=mylimit;
content_by_lua_block {
ngx.say("hello world")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment