This commit is contained in:
Mateusz Gruszczyński committed 2026-10-07 08:51:04 +02:00
1 parent a9f9450f80
commit 762eb9e28b
81 files changed
+1242 -1095

No files matched your search

+1
View File
@@ -388,6 +388,7 @@ impl Service {
try_files: self.try_files.clone(),
rewrites,
precompressed: self.precompressed.clone(),
compression: self.compression.clone(),
download_extensions: self.download_extensions.iter().cloned().collect(),
symlink_policy: self.symlink_policy,
script_extensions,
+3
View File
@@ -340,6 +340,8 @@ pub struct Service {
pub rewrites: Vec<RewriteRule>,
/// Serve pre-generated `.br`/`.gz` sidecars when accepted by the client.
pub precompressed: Precompressed,
/// Optional downstream dynamic-compression override. Codecs remain global.
pub compression: crate::compression::Overrides,
/// Extensions that should be downloaded as attachments.
pub download_extensions: Vec<String>,
/// Symlink handling. The conservative default is `deny`.
@@ -368,6 +370,7 @@ impl Default for Service {
try_files: Vec::new(),
rewrites: Vec::new(),
precompressed: Precompressed::default(),
compression: crate::compression::Overrides::default(),
download_extensions: Vec::new(),
symlink_policy: SymlinkPolicy::Deny,
php: Php::default(),
+1
View File
@@ -53,6 +53,7 @@ pub struct CompiledService {
pub(super) try_files: Vec<String>,
pub(super) rewrites: Vec<CompiledRewriteRule>,
pub(super) precompressed: Precompressed,
pub compression: crate::compression::Overrides,
pub(super) download_extensions: HashSet<String>,
pub(super) symlink_policy: SymlinkPolicy,
pub(super) script_extensions: HashSet<String>,
+1 -1
View File
@@ -159,7 +159,7 @@ pub(super) fn fastcgi_params(
if context.tls { "on" } else { "off" }.into(),
);
params.insert("GATEWAY_INTERFACE".into(), "CGI/1.1".into());
params.insert("SERVER_SOFTWARE".into(), "RustProxy/0.26.7".into());
params.insert("SERVER_SOFTWARE".into(), "RustProxy/0.27.0".into());
params.insert("REDIRECT_STATUS".into(), "200".into());
if let Some(value) = headers
.get(CONTENT_TYPE)
+1 -1
View File
@@ -185,7 +185,7 @@ pub(super) fn directory_listing(path: &str, entries: &[DirectoryEntry]) -> Vec<u
"<a class=\"{class}\" href=\"{href}\"><span class=\"type\">{type_label}</span><span class=\"name\">{label}{slash}</span><span class=\"kind\">{kind}</span></a>"
));
}
html.push_str(r#"</div></section><footer class="page-footer"><span>RustProxy <b>0.26.7</b></span><span>Web Server · Directory listing</span></footer></main></body></html>"#);
html.push_str(r#"</div></section><footer class="page-footer"><span>RustProxy <b>0.27.0</b></span><span>Web Server · Directory listing</span></footer></main></body></html>"#);
html.into_bytes()
}
+1 -1
View File
@@ -202,7 +202,7 @@ async fn empty_index_can_go_directly_to_directory_listing() {
let body = std::str::from_utf8(&body).unwrap();
assert!(body.contains("file.txt"));
assert!(body.contains("DIRECTORY LISTING"));
assert!(body.contains("RustProxy <b>0.26.7</b>"));
assert!(body.contains("RustProxy <b>0.27.0</b>"));
}
#[tokio::test]