Force use of $config{url} as top URL in w3mmode
parent
210bf742b9
commit
b0a35c817e
|
@ -58,7 +58,10 @@ sub cgitemplate ($$$;@) {
|
|||
|
||||
my $template=template("page.tmpl");
|
||||
|
||||
my $topurl = defined $cgi ? $cgi->url : $config{url};
|
||||
my $topurl = $config{url};
|
||||
if (defined $cgi && ! $config{w3mmode}) {
|
||||
$topurl = $cgi->url;
|
||||
}
|
||||
|
||||
my $page="";
|
||||
if (exists $params{page}) {
|
||||
|
|
|
@ -32,3 +32,5 @@ The problem is that IkiWiki::CGI::cgitemplate() and IkiWiki::CGI::redirect() use
|
|||
A quick workaround might be to force the use of $config{url} instead of $cgi->url as a base for URLs when w3mmode is set.
|
||||
|
||||
-- Martin
|
||||
|
||||
> [[Fixed|done]] --[[smcv]]
|
||||
|
|
|
@ -521,11 +521,8 @@ run(["./t/tmp/ikiwiki.cgi"], \undef, \$content, init => sub {
|
|||
%bits = parse_cgi_content($content);
|
||||
like($bits{tophref}, qr{^(?:\Q$pwd\E/t/tmp/out|\.)/$});
|
||||
like($bits{cgihref}, qr{^(?:file://)?/\$LIB/ikiwiki-w3m.cgi/ikiwiki.cgi$});
|
||||
TODO: {
|
||||
local $TODO = "should be file:///";
|
||||
like($bits{basehref}, qr{^(?:(?:file:)?//)?\Q$pwd\E/t/tmp/out/$});
|
||||
like($bits{stylehref}, qr{^(?:(?:(?:file:)?//)?\Q$pwd\E/t/tmp/out|\.)/style.css$});
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
# site 6: we're behind a reverse-proxy
|
||||
|
|
Loading…
Reference in New Issue