Update nginx config

This commit is contained in:
Lucas Verney 2018-07-18 15:07:40 +02:00
parent 3182dbb985
commit 20a162e915

View File

@ -1,4 +1,6 @@
# UWSGI proxy pass
# API rate limitation
limit_req_zone $binary_remote_addr zone=cycloAPI:10m rate=1r/s;# UWSGI proxy pass
upstream _cyclassist {
server unix:/run/uwsgi/app/cyclassist/socket;
}
@ -44,6 +46,7 @@ server {
# Proxy pass the API calls to the server part
location /api {
limit_req zone=cycloAPI burst=3 nodelay;
include uwsgi_params;
uwsgi_pass _cyclassist;
}