insert only base path in JSON API responses, without GET parameters

This commit is contained in:
El RIDO 2026-06-15 23:12:52 +02:00
parent e3041700cf
commit 164c839c39
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
2 changed files with 3 additions and 2 deletions

View file

@ -4,6 +4,7 @@
* FIXED: State corruption after "Remove attachment" (#1824)
* FIXED: Copy button is hidden if the document is made as markdown (#1703)
* FIXED: Shortened URLs from YOURLS received but failed to parse (#1844)
* FIXED: Insert only base path in JSON API responses, without GET parameters
## 2.0.4 (2026-05-03)
* ADDED: Translations for Swedish & Persian

View file

@ -220,7 +220,7 @@ class Request
}
/**
* Get request URI
* Get request URI path without GET parameters
*
* @access public
* @return string
@ -228,7 +228,7 @@ class Request
public function getRequestUri()
{
$uri = array_key_exists('REQUEST_URI', $_SERVER) ? filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL) : '';
return empty($uri) ? '/' : $uri;
return empty($uri) ? '/' : parse_url($uri, PHP_URL_PATH);
}
/**