mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 07:56:07 +01:00
Revert "Set template type based on request headers content-type if set"
This reverts commit 005f626b88.
# Conflicts:
# CHANGELOG.md
# system/src/Grav/Common/Page/Page.php
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
1. [](#improved)
|
||||
* Allow custom Flex form views
|
||||
* Cleaned up and sorted the Service `idMap`
|
||||
* Allow request headers `Content-Type` to set the template type [form#221](https://github.com/getgrav/grav-plugin-form/issues/221)
|
||||
1. [](#bugfix)
|
||||
* Fixed `Uri::hasStandardPort()` to support reverse proxy configurations [#1786](https://github.com/getgrav/grav/issues/1786)
|
||||
* Use `append_url_extension` from page header to set template format if set [#2604](https://github.com/getgrav/grav/pull/2064)
|
||||
|
||||
@@ -1292,10 +1292,7 @@ class Page implements PageInterface
|
||||
}
|
||||
|
||||
if (empty($this->template_format)) {
|
||||
$content_type = Grav::instance()['uri']->getContentType(true);
|
||||
$fallback_type = Utils::getExtensionByMime($content_type);
|
||||
$default = is_null($content_type) ? Grav::instance()['uri']->extension('html') : $fallback_type;
|
||||
$this->template_format = $default;
|
||||
$this->template_format = Grav::instance()['uri']->extension('html');
|
||||
}
|
||||
|
||||
return $this->template_format;
|
||||
|
||||
Reference in New Issue
Block a user