From f37c08f341ca97fdfba2b67907b609f76e967eef Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Thu, 12 Oct 2017 21:18:34 +0300 Subject: [PATCH] Regression: Ajax error in ngnix (#1244) --- CHANGELOG.md | 6 ++++++ system/src/Grav/Common/Uri.php | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d830719..2ca0856ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.3.6 +## mm/dd/2017 + +1. [](#bugfix) + * Regression: Ajax error in ngnix (#1244) + # v1.3.5 ## 10/11/2017 diff --git a/system/src/Grav/Common/Uri.php b/system/src/Grav/Common/Uri.php index b69431813..06cf8bc87 100644 --- a/system/src/Grav/Common/Uri.php +++ b/system/src/Grav/Common/Uri.php @@ -90,6 +90,13 @@ class Uri $this->query = parse_url('http://example.com' . $request_uri, PHP_URL_QUERY); } + // Support ngnix routes. + if (strpos($this->query, '_url=') === 0) { + parse_str($this->query, $query); + unset($query['_url']); + $this->query = http_build_query($query); + } + // Build fragment. $this->fragment = null;