mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-13 01:36:22 +00:00
36 lines
749 B
Plaintext
36 lines
749 B
Plaintext
{{{ logFormatters }}}
|
|
|
|
{{{ metrics }}}
|
|
|
|
{{{ dockerVersionMap }}}
|
|
|
|
# create a custom request limit zone which can handle 160,000 IP-Addresses at the same time
|
|
# routes using this limit zone will limit each client to not send more than one request in 50ms
|
|
# be sure to use burst handling when needed, because most clients will fire some requests in parallel
|
|
|
|
geo $isRateLimited {
|
|
default 1;
|
|
{{{ rateLimitAllowList }}}
|
|
}
|
|
|
|
map $isRateLimited $rateLimit {
|
|
0 "";
|
|
1 $binary_remote_addr;
|
|
}
|
|
|
|
limit_req_zone $rateLimit zone=customstappslimit:10m rate=20r/s;
|
|
|
|
server {
|
|
charset utf-8;
|
|
error_log stderr;
|
|
access_log /dev/stdout {{{ logFormat }}};
|
|
|
|
{{{ listener }}}
|
|
|
|
{{{ visibleRoutes }}}
|
|
|
|
{{{ hiddenRoutes }}}
|
|
|
|
{{{ staticRoute }}}
|
|
}
|