name => 'urlbase',
default => _migrate_param( "urlbase", "" ),
},
+ {
+ name => 'canonical_urlbase',
+ default => '',
+ },
{
name => 'attachment_base',
default => _migrate_param( "attachment_base", '' ),
sub read_localconfig {
my ($include_deprecated) = @_;
+ my $config = $ENV{LOCALCONFIG_ENV}
+ ? _read_localconfig_from_env()
+ : _read_localconfig_from_file($include_deprecated);
- if ($ENV{LOCALCONFIG_ENV}) {
- return _read_localconfig_from_env();
- }
- else {
- return _read_localconfig_from_file($include_deprecated);
- }
+ # Use the site's URL as the default Canonical URL
+ $config->{canonical_urlbase} //= $config->{urlbase};
+
+ return $config;
}
#
BMO_urlbase
The public url for this instance. Note that if this begins with https://
- abd BMO_inbound_proxies is set to '*' Bugzilla will believe the connection to it
+ and BMO_inbound_proxies is set to '*' Bugzilla will believe the connection to it
is using SSL.
+BMO_canonical_urlbase
+ The public url for the production instance, if different from urlbase above.
+
BMO_attachment_base
This is the url for attachments.
When the allow_attachment_display parameter is on, it is possible for a
<link rel="shortcut icon" href="extensions/BMO/web/images/favicon.ico">
[% IF bug %]
-<link id="shorturl" rev="canonical" href="https://bugzil.la/[% bug.bug_id FILTER uri %]">
+<link rel="canonical" href="[% Bugzilla.localconfig.canonical_urlbase FILTER none %]show_bug.cgi?id=[% bug.bug_id FILTER uri %]">
[% END %]
[%# *** Bug List Navigation *** %]
END
localconfig_urlbase => <<'END',
The URL that is the common initial leading part of all URLs.
+END
+ localconfig_canonical_urlbase => <<'END',
+The URL that is the canonical initial leading part of all URLs.
+This will be the production url for a dev site, for instance.
END
localconfig_use_suexec => <<'END',
Set this to 1 if Bugzilla runs in an Apache SuexecUserGroup environment.