|
|
@@ -35,10 +35,9 @@ switch($request_method) {
|
|
|
// Remove /api/ from the beginning if present
|
|
|
$picture_url = str_replace('/api/', '', $picture_url);
|
|
|
}
|
|
|
- // Ensure proper URL format
|
|
|
+ // Use relative URL to avoid mixed content warnings
|
|
|
if ($picture_url && !preg_match('/^https?:\/\//', $picture_url)) {
|
|
|
- $baseUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
|
|
|
- $picture_url = $baseUrl . '/' . ltrim($picture_url, '/');
|
|
|
+ $picture_url = '/' . ltrim($picture_url, '/');
|
|
|
}
|
|
|
|
|
|
$item_arr = array(
|
|
|
@@ -81,10 +80,9 @@ switch($request_method) {
|
|
|
// Remove /api/ from the beginning if present
|
|
|
$picture_url = str_replace('/api/', '', $picture);
|
|
|
}
|
|
|
- // Ensure proper URL format
|
|
|
+ // Use relative URL to avoid mixed content warnings
|
|
|
if ($picture_url && !preg_match('/^https?:\/\//', $picture_url)) {
|
|
|
- $baseUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
|
|
|
- $picture_url = $baseUrl . '/' . ltrim($picture_url, '/');
|
|
|
+ $picture_url = '/' . ltrim($picture_url, '/');
|
|
|
}
|
|
|
|
|
|
$item_item = array(
|