We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8daf08a commit f17621dCopy full SHA for f17621d
src/AliOss.php
@@ -86,7 +86,9 @@ public function url($key, $rule = null)
86
$append = $this->separator . $rule;
87
}
88
89
- return 'http://' . $this->bucket . '.' . $this->endPoint . '/' . $key . $append;
+ $http = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
90
+
91
+ return $http . '://' . $this->bucket . '.' . $this->endPoint . '/' . $key . $append;
92
93
94
/**
0 commit comments