summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/index.php b/index.php
index 21e222e3b..5a08aa078 100644
--- a/index.php
+++ b/index.php
@@ -283,6 +283,14 @@ function main()
return;
}
+ $site_ssl = common_config('site', 'ssl');
+
+ // If the request is HTTP and it should be HTTPS...
+ if ($site_ssl != 'never' && !StatusNet::isHTTPS() && common_is_sensitive($args['action'])) {
+ common_redirect(common_local_url($args['action'], $args));
+ return;
+ }
+
$args = array_merge($args, $_REQUEST);
Event::handle('ArgsInitialize', array(&$args));