mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
proxy ips to match tests, prevent fail for no proxies
This commit is contained in:
parent
776bbeaa2c
commit
1ac30ea529
3 changed files with 6 additions and 2 deletions
|
@ -14,5 +14,5 @@ logs_path: "/tmp/neocitiestestlogs"
|
||||||
letsencrypt_key: ./tests/files/letsencrypt.key
|
letsencrypt_key: ./tests/files/letsencrypt.key
|
||||||
letsencrypt_endpoint: https://acme-staging.api.letsencrypt.org/
|
letsencrypt_endpoint: https://acme-staging.api.letsencrypt.org/
|
||||||
proxy_ips:
|
proxy_ips:
|
||||||
- 127.0.0.1
|
- 10.0.0.1
|
||||||
- 127.0.0.2
|
- 10.0.0.2
|
||||||
|
|
|
@ -11,6 +11,8 @@ class DeleteCacheOrderWorker
|
||||||
#proxy_ips = Resolv.getaddresses($config['cache_purge_ips_uri']).keep_if {|r| !r.match(/:/)}
|
#proxy_ips = Resolv.getaddresses($config['cache_purge_ips_uri']).keep_if {|r| !r.match(/:/)}
|
||||||
proxy_ips = $config['proxy_ips']
|
proxy_ips = $config['proxy_ips']
|
||||||
|
|
||||||
|
return if proxy_ips.nil? || proxy_ips.empty?
|
||||||
|
|
||||||
proxy_ips.each do |proxy_ip|
|
proxy_ips.each do |proxy_ip|
|
||||||
DeleteCacheWorker.perform_async proxy_ip, username, path
|
DeleteCacheWorker.perform_async proxy_ip, username, path
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,6 +11,8 @@ class PurgeCacheOrderWorker
|
||||||
proxy_ips = $config['proxy_ips']
|
proxy_ips = $config['proxy_ips']
|
||||||
#proxy_ips = Resolv.getaddresses($config['cache_purge_ips_uri']).keep_if {|r| !r.match(/:/)}
|
#proxy_ips = Resolv.getaddresses($config['cache_purge_ips_uri']).keep_if {|r| !r.match(/:/)}
|
||||||
|
|
||||||
|
return if proxy_ips.nil? || proxy_ips.empty?
|
||||||
|
|
||||||
proxy_ips.each do |proxy_ip|
|
proxy_ips.each do |proxy_ip|
|
||||||
PurgeCacheWorker.perform_async proxy_ip, username, path
|
PurgeCacheWorker.perform_async proxy_ip, username, path
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue