1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2026-03-07 06:11:42 +01:00
infrastructure/roles/gitlab/templates/nginx-mixin-bypass.conf.j2
Christian Heusel 36b032fe2f
gitlab: Exclude our runners from rate limiting
As we recently made rate limits stricter it happens to also cause our
own runners to run into them, therefore causing unwanted pipeline
failures. Especially with the recent changes enabling gitaly caching
this should be easy to handle for gitlab.

Fixes https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/769

Link: https://gitlab.archlinux.org/archlinux/infrastructure/-/merge_requests/1066
Signed-off-by: Christian Heusel <christian@heusel.eu>
2025-11-30 18:19:07 +01:00

15 lines
330 B
Django/Jinja

set $bypass 0;
{% for host in (groups['gitlab_runners'] + ['repos.archlinux.org']) %}
# {{ host }}
if ($remote_addr = "{{ hostvars[host]['ipv4_address'] }}") {
set $bypass 1;
}
if ($remote_addr = "{{ hostvars[host]['ipv6_address'] }}") {
set $bypass 1;
}
{% endfor %}
proxy_set_header Gitlab-Bypass-Rate-Limiting $bypass;