Quantcast
Channel: Nginx Forum - Nginx Mailing List - Russian
Viewing all articles
Browse latest Browse all 3102

auth_request и conn_limit (no replies)

$
0
0
Добрый день всем!

Можно ли заставить работать одновременно conn_limit и auth_request одновременно?

Желаемая схема такая:
location /data0002 {
auth_request /authcheck;
auth_request_set $error_code $upstream_http_x_error_code;
auth_request_set $token $upstream_http_x_token;
limit_conn connections 1;
limit_conn_status 429;
error_page 403 =200 /forbiden;
error_page 429 =200 /to_many_connections;
proxy_intercept_errors on;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_pass http://127.0.0.1:8000/data;
error_page 500 501 502 503 504 404 403 =200 /no_data;
}

Но смысл в том, что похоже conn_limit отрабатывает до auth_check и $token устанавливается после того, как отработает conn_limit.
Причем, задать $token статически, то conn_limit отрабатывает, но это не интересно.....

Viewing all articles
Browse latest Browse all 3102

Latest Images

Trending Articles



Latest Images

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