Quellcode durchsuchen

fix Traefik Redirection adds an . at ending (#1484)

CauseFX vor 5 Jahren
Ursprung
Commit
8e7c48e5b2
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      api/functions/normal-functions.php

+ 2 - 1
api/functions/normal-functions.php

@@ -477,7 +477,8 @@ trait NormalFunctions
 				$domain = $_SERVER['HTTP_HOST'];
 			}
 		}
-		$url = $protocol . $domain . str_replace("\\", "/", dirname($_SERVER['REQUEST_URI']));
+		$path = (str_replace("\\", "/", dirname($_SERVER['REQUEST_URI'])) !== '.') ?? '';
+		$url = $protocol . $domain . $path;
 		if (strpos($url, '/api') !== false) {
 			$url = explode('/api', $url);
 			return $url[0] . '/';