summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorUrban Müller2015-02-24 17:49:01 +0100
committerUrban Müller2015-02-24 17:49:01 +0100
commit93fc1fc439122f8370b5b5b62d29887683f30b34 (patch)
treed905608298b4e368651f2469e57b7131b3afc4dd /it_url.class
parent49e94023935f2d3857cd9ec7a8b8bc8c196a9dec (diff)
downloaditools-93fc1fc439122f8370b5b5b62d29887683f30b34.tar.gz
itools-93fc1fc439122f8370b5b5b62d29887683f30b34.tar.bz2
itools-93fc1fc439122f8370b5b5b62d29887683f30b34.zip
send referer if internal request
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class1
1 files changed, 1 insertions, 0 deletions
diff --git a/it_url.class b/it_url.class
index 489998f..a842e51 100644
--- a/it_url.class
+++ b/it_url.class
@@ -316,6 +316,7 @@ function request($p=array())
'Host' => $url->realhostname . $url->explicitport,
'User-Agent' => "Mozilla/5.0 (compatible; MSIE 9.0; ITools)",
'Accept-Language' => $p['headers']['Accept-Language'] ?: T_lang(), # can prevent loading of it_text
+ 'Referer' => it::match('([-\w]+\.\w+)$', $url->hostname) == it::match('([-\w]+\.\w+)$', $_SERVER['HTTP_HOST']) ? it_url::absolute(U($_GET)) : null,
);
if (is_int($p['filemtime']))