1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-28 09:20:58 +01:00

Better SSL support.

This commit is contained in:
Savetheinternet 2011-11-20 16:19:00 +11:00
parent 7e40483b68
commit 3380c3008f

View File

@ -40,8 +40,7 @@
if(!isset($config['referer_match'])) if(!isset($config['referer_match']))
$config['referer_match'] = '/^' . $config['referer_match'] = '/^' .
(preg_match($config['url_regex'], $config['root']) ? '' : (preg_match($config['url_regex'], $config['root']) ? '' :
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http') . 'https?:\/\/'.$_SERVER['HTTP_HOST']) .
':\/\/'.$_SERVER['HTTP_HOST']) .
preg_quote($config['root'], '/') . preg_quote($config['root'], '/') .
'(' . '(' .
str_replace('%s', '\w+', preg_quote($config['board_path'], '/')) . str_replace('%s', '\w+', preg_quote($config['board_path'], '/')) .