From 1988d730c0088e8b1f6193650c7ee929df8a2ed7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 2 Jan 2020 03:09:30 +0000 Subject: config: support multi-value inbox.*.*url Since the beginning of this project, we've implicitly supported inboxes with multiple URLs by relying on the Host: header sent by the client ($env->{HTTP_HOST}). We now offer the option to explicitly configure multiple URLs for every inbox along with the ability to do a best-effort match for matching hostnames. --- lib/PublicInbox/WwwListing.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/WwwListing.pm') diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index 1faade6c..4f076b7d 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -32,7 +32,7 @@ sub list_all ($$$) { sub list_match_domain_i { my ($ibx, $arg) = @_; my ($list, $hide_key, $re) = @$arg; - if (!$ibx->{-hide}->{$hide_key} && $ibx->{url} =~ $re) { + if (!$ibx->{-hide}->{$hide_key} && grep($re, @{$ibx->{url}})) { push @$list, $ibx; } } @@ -90,7 +90,7 @@ sub ibx_entry { ${\$ibx->description} if (defined(my $info_url = $ibx->{infourl})) { - $tmp .= ' ' . $info_url . "\n"; + $tmp .= ' ' . PublicInbox::Hval::prurl($env, $info_url) . "\n"; } $tmp; } -- cgit v1.2.3-24-ge0c7