All links and redirects are now relative

WARNING - this might break. We'll revert this commit if so.
The rationale is for those using proxies where the host name is not proxied
on, as in Apache's ProxyPreserveHost.
RFC2161 does not permit relative Location: header, but an upcoming revision
stil in-draft will apparently allow relative spec. I believe all browsers to
support relative Location: headers already.
This commit is contained in:
Oliver Gorwits
2013-03-04 21:40:43 +00:00
parent 9848de5c26
commit e3c0ae3554
6 changed files with 21 additions and 10 deletions

View File

@@ -43,7 +43,7 @@ hook 'before_template' => sub {
if request->base->path ne '/';
# allow portable dynamic content
$tokens->{uri_for} = \&uri_for;
$tokens->{uri_for} = sub { uri_for(@_)->path_query() };
# allow very long lists of ports
$Template::Directive::WHILE_MAX = 10_000;