Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

how to apply LIMIT_CONN after AUTH_REQUEST

$
0
0
Hi,

i need to limit concurrent connection count, but not per IP as shown everywhere, but per a variable (user_id for example) set by auth_request_module

Example:

http {
limit_conn_zone $my_userid zone=peruser:40m;
}

server {
auth_request /auth;
auth_request_set $my_userid $upstream_http_x_userid;

location /auth {
...
}

limit_conn peruser 2;
}



.. could it be done somehow?

Thanks

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>