fix get_protocol bug.

$_SERVER['HTTPS'] == '' on nginx http
pico-3.0-alpha
raptor 11 years ago
parent 234c295f69
commit 8efa97accc
  1. 2
      lib/pico.php

@ -309,7 +309,7 @@ class Pico {
protected function get_protocol()
{
$protocol = 'http';
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' && $_SERVER['HTTPS'] != ''){
$protocol = 'https';
}
return $protocol;

Loading…
Cancel
Save