diff --git a/src/types/request.rs b/src/types/request.rs index 9f81145..f12367b 100644 --- a/src/types/request.rs +++ b/src/types/request.rs @@ -227,7 +227,14 @@ impl Request { #[cfg(feature = "scgi_srv")] { self.script_path.as_ref().map(|base| { let base: &Path = base.as_ref(); - base.join(path.as_ref()).display().to_string() + + // Make path relative + let mut path_as_path: &Path = path.as_ref().as_ref(); + if path_as_path.is_absolute() { + path_as_path = (&path.as_ref()[1..]).as_ref(); + } + + base.join(path_as_path).display().to_string() }) } #[cfg(feature = "gemini_srv")] {