mirror of
https://github.com/getgrav/grav.git
synced 2026-02-05 06:10:13 +01:00
Merge branch 'develop' into 1.6
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"type": "project",
|
||||
"description": "Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS",
|
||||
"keywords": ["cms","flat-file cms","flat cms","flatfile cms","php"],
|
||||
"homepage": "http://getgrav.org",
|
||||
"homepage": "https://getgrav.org",
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": ">=7.1.3",
|
||||
|
||||
@@ -223,7 +223,7 @@ class ImageMedium extends Medium
|
||||
foreach ($this->alternatives as $ratio => $medium) {
|
||||
$srcset[] = $medium->url($reset) . ' ' . $medium->get('width') . 'w';
|
||||
}
|
||||
$srcset[] = $this->url($reset) . ' ' . $this->get('width') . 'w';
|
||||
$srcset[] = str_replace(' ', '%20', $this->url($reset)) . ' ' . $this->get('width') . 'w';
|
||||
|
||||
return implode(', ', $srcset);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ class Page implements PageInterface
|
||||
unset($process_fields[$field]);
|
||||
}
|
||||
}
|
||||
$text_header = Grav::instance()['twig']->processString(json_encode($process_fields), ['page' => $this]);
|
||||
$text_header = Grav::instance()['twig']->processString(json_encode($process_fields, JSON_UNESCAPED_UNICODE), ['page' => $this]);
|
||||
$this->header((object)(json_decode($text_header, true) + $ignored_fields));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1140,6 +1140,8 @@ class Uri
|
||||
$this->scheme = $env['HTTP_X_FORWARDED_PROTO'];
|
||||
} elseif (isset($env['X-FORWARDED-PROTO'])) {
|
||||
$this->scheme = $env['X-FORWARDED-PROTO'];
|
||||
} elseif (isset($env['HTTP_CLOUDFRONT_FORWARDED_PROTO'])) {
|
||||
$this->scheme = $env['HTTP_CLOUDFRONT_FORWARDED_PROTO'];
|
||||
} elseif (isset($env['REQUEST_SCHEME'])) {
|
||||
$this->scheme = $env['REQUEST_SCHEME'];
|
||||
} else {
|
||||
@@ -1168,6 +1170,10 @@ class Uri
|
||||
$this->port = (int)$env['HTTP_X_FORWARDED_PORT'];
|
||||
} elseif (isset($env['X-FORWARDED-PORT'])) {
|
||||
$this->port = (int)$env['X-FORWARDED-PORT'];
|
||||
} elseif (isset($env['HTTP_CLOUDFRONT_FORWARDED_PROTO'])) {
|
||||
// Since AWS Cloudfront does not provide a forwarded port header,
|
||||
// we have to build the port using the scheme.
|
||||
$this->port = $this->port();
|
||||
} elseif (isset($env['SERVER_PORT'])) {
|
||||
$this->port = (int)$env['SERVER_PORT'];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user