summaryrefslogtreecommitdiff
path: root/frontends/etc
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-31 15:36:33 +0200
committerPaul Buetow <paul@buetow.org>2026-01-31 15:36:33 +0200
commit678dbd8f6c0e581e185a527e9d380546dd8fb205 (patch)
treebd1a13a92648dfc1eee7c33b14b28d0a62fd9979 /frontends/etc
parent9f0c3ca6d45b99db5523cff05f39fb968febac6d (diff)
fix: relayd template and missing ipv4address variable
- Fixed Perl template syntax error in relayd.conf.tpl (lines 68-77) with improperly nested if/elsif blocks - Added ipv4address subroutine to Rexfile to lookup IPv4 by hostname - Updated relayd template to use ipv4address->($hostname) instead of undefined $vio0_ip variable - Pass ipv4address to template engine in relayd task Amp-Thread-ID: https://ampcode.com/threads/T-019c1441-7e3a-77cd-890f-cd31df998a31 Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'frontends/etc')
-rw-r--r--frontends/etc/relayd.conf.tpl17
1 files changed, 10 insertions, 7 deletions
diff --git a/frontends/etc/relayd.conf.tpl b/frontends/etc/relayd.conf.tpl
index 159b097..7c38464 100644
--- a/frontends/etc/relayd.conf.tpl
+++ b/frontends/etc/relayd.conf.tpl
@@ -65,14 +65,17 @@ http protocol "https" {
# For f3s hosts: use relay-level failover (f3s -> localhost backup)
# Registry is special: needs explicit routing to port 30001
- <% for my $host (@$f3s_hosts) { for my $prefix (@prefixes) {
- if ($host eq 'registry.f3s.buetow.org') { -%>
+ <% for my $host (@$f3s_hosts) {
+ for my $prefix (@prefixes) {
+ if ($host eq 'registry.f3s.buetow.org') {
+ -%>
match request header "Host" value "<%= $prefix.$host -%>" forward to <f3s_registry>
- <% }
- elsif ($host eq 'jellyfin.f3s.buetow.org') { -%>
+ <% } elsif ($host eq 'jellyfin.f3s.buetow.org') {
+ -%>
match request header "Host" value "<%= $prefix.$host -%>" forward to <f3s_jellyfin>
- <% }
- } } -%>
+ <% }
+ }
+ } -%>
# Add cache-control headers to f3s fallback pages (served from localhost when cluster is down)
match response header set "Cache-Control" value "no-cache, no-store, must-revalidate"
@@ -81,7 +84,7 @@ http protocol "https" {
}
relay "https4" {
- listen on <%= $vio0_ip %> port 443 tls
+ listen on <%= $ipv4address->($hostname) %> port 443 tls
protocol "https"
persist
timeout connect 10s