Skip to content

Commit 304afed

Browse files
authored
Merge pull request #486 from jjrom/develop
[IMPORTANT] Use $request_uri instead of $uri in nginx to get raw inpu…
2 parents 686b28f + 11d183e commit 304afed

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

app/resto/core/RestoConstants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class RestoConstants
2020
// [IMPORTANT] Starting resto 7.x, default routes are defined in RestoRouter class
2121

2222
// resto version
23-
const VERSION = '9.5.5';
23+
const VERSION = '9.5.6';
2424

2525
/* ============================================================
2626
* NEVER EVER TOUCH THESE VALUES

app/resto/core/RestoContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ private function setQuery()
393393
*/
394394
private function setPath()
395395
{
396-
$restoUrl = filter_input(INPUT_GET, '_path', FILTER_UNSAFE_RAW);
396+
$restoUrl = explode('?', filter_input(INPUT_GET, '_path', FILTER_UNSAFE_RAW))[0];
397397
if (isset($restoUrl)) {
398398
$this->path = ($restoUrl !== '/' && substr($restoUrl, -1) === '/' ? substr($restoUrl, 0, strlen($restoUrl) - 1) : $restoUrl);
399399
}

build/resto/container_root/etc/nginx/sites-available/default

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ server {
1111
index index.php;
1212

1313
location / {
14-
try_files $uri /index.php?_path=$uri&$args;
14+
# try_files $uri /index.php?_path=$uri&$args;
15+
try_files $uri /index.php?_path=$request_uri&$args;
1516
}
1617

1718
location /static/ {

0 commit comments

Comments
 (0)