summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-25 13:14:33 -0700
committerBrion Vibber <brion@pobox.com>2010-10-25 13:14:33 -0700
commitb483a0549f115b2d5f2cfb3d447e6cc5c4f469f3 (patch)
treef63f4f3e93bad7611f4b5651171fc5122ec65455 /index.php
parent3b6f738ab73b7f77dd09ac21dd9446876776fc04 (diff)
parentca489631db840e33757a71a7e4cb56b187c182d3 (diff)
Merge branch '1.0.x' into schema-x
Conflicts: plugins/CacheLog/locale/nb/LC_MESSAGES/CacheLog.po
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));