We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2eaa725 commit 1cfe8e3Copy full SHA for 1cfe8e3
1 file changed
core.php
@@ -69,8 +69,8 @@
69
// Lettura della configurazione
70
$config = App::getConfig();
71
72
-// Redirect al percorso HTTPS se impostato nella configurazione
73
-if (!empty($config['redirectHTTPS']) && !isHTTPS(true)) {
+// Redirect al percorso HTTPS se impostato nella configurazione e la richiesta è da browser
+if ($config['redirectHTTPS'] == true && !isHTTPS(true) && php_sapi_name() != "cli") {
74
header('HTTP/1.1 301 Moved Permanently');
75
header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
76
exit;
0 commit comments