# Chat rate limits
# Same limit zone is used in all chat virtual host. So below limit
# is across all chat server access over proxy. For chat a client may
# need max 4 unique connections - 2 for service discovery hosts and 2
# for home and backup node. Added some buffer to it.
limit_conn chathttp1connperip ${NGX_CHAT_HTTP1_CONN_LIMIT};
limit_conn chathttp2connperip ${NGX_CHAT_HTTP2_CONN_LIMIT};
limit_req zone=chatratelimit burst=${NGX_CHAT_REQUEST_BURST_LIMIT} nodelay;

# referer_hash_bucket_size value
referer_hash_bucket_size ${NGX_CHAT_REFERER_HASH_BUCKET_SIZE};

# Ensure the maximum body size for URIs is defined
client_max_body_size ${NGX_CLIENT_MAX_BODY_SIZE};
# Ensure the maximum buffer size for URIs is defined
large_client_header_buffers ${NGX_LARGE_CLIENT_HEADER_BUFFER_NUM} ${NGX_LARGE_CLIENT_HEADER_BUFFER_SIZE};

# Timeouts configuration
keepalive_timeout ${NGX_KEEPALIVE_TIMEOUT};
client_header_timeout ${NGX_CLIENT_HEADER_TIMEOUT};
client_body_timeout ${NGX_CLIENT_BODY_TIMEOUT};
