]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - index.php
Merge branch '1.0.x' into schema-x
[quix0rs-gnu-social.git] / index.php
index 21e222e3b803c2d45e7dae07511b84eed66a0bf6..5a08aa07825c4d11b87a2e726c81c1db5be8b4ee 100644 (file)
--- 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));