Fix pagure templating to take its own IP v6 in account

ssh git@pagure.io was broken (no longer accepting ssh connection).
A quick debug show that it was caused by the helper script not working,
showing a 403 error. And the httpd logs were complaining about
authorized IPs not present in the configuration.

The root cause is in 938e63fa71 as the variables were renamed
from eth0_ip and eth0_ipv6 to eth0_ipv4_ip and eth0_ipv6_ip

Then pagure config got regenerated later and this triggered the
bug preventing people from pushing.
This commit is contained in:
Michael Scherer 2022-01-27 15:53:38 +01:00
parent 4d04c9a631
commit 989b0c433d

View file

@ -79,10 +79,10 @@ GIT_URL_GIT = 'https://pagure.io/'
{% endif %}
### The IP addresses allowed for the internal endpoints
{% if eth0_ipv6 is defined %}
IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1', '{{ eth0_ip }}' , '{{ eth0_ipv6 }}']
{% elif eth0_ip is defined %}
IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1', '{{ eth0_ip }}']
{% if eth0_ipv6_ip is defined %}
IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1', '{{ eth0_ipv4_ip }}' , '{{ eth0_ipv6_ip }}']
{% elif eth0_ipv4_ip is defined %}
IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1', '{{ eth0_ipv4_ip }}']
{% else %}
IP_ALLOWED_INTERNAL = ['127.0.0.1', 'localhost', '::1']
{% endif %}