1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-21 11:26:38 +02:00

previous one was not good enough i guess

This commit is contained in:
Andrew Dolgov 2021-03-03 11:37:58 +03:00
parent 1aedd22306
commit dbda996a7a

View File

@ -284,7 +284,7 @@ class Config {
$proto = self::is_server_https() ? 'https' : 'http';
$self_url_path = $proto . '://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
$self_url_path = preg_replace("/\w+\.php$/", "", $self_url_path);
$self_url_path = preg_replace("/\w+\.php(\?.*$)?$/", "", $self_url_path);
if (substr($self_url_path, -1) === "/") {
return substr($self_url_path, 0, -1);