From c6157ba76a319a40535d0382625d644f6e4c1a8e Mon Sep 17 00:00:00 2001 From: dw5 <29355584+dw5@users.noreply.github.com> Date: Thu, 9 May 2024 16:28:37 +0300 Subject: [PATCH] docs --- EXAMPLES.md | 5 ++++- README.md | 3 ++- src/main.rs | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 9393d68..bf6d76f 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -39,4 +39,7 @@ function transfersh ($filename) # Example usage swscli(".\my-automatic-output.csv") -``` \ No newline at end of file +``` + +If CURL is available on Windows (should be by default in W10 and W11 unless your workplace blocks it), and Linux distros +curl.exe -v -X POST -F "csrf=notoken" -F "files=@$MyFile.csv;filename=$MyFile.csv" http://my-simpler-srv.local:8000/ \ No newline at end of file diff --git a/README.md b/README.md index 920916e..40406d2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Simpler HTTP Server +Fork of simpler-http-server removing CSRF (for rare niche edge cases when it's a must) # How it looks like? @@ -29,7 +30,7 @@ FLAGS: OPTIONS: -a, --auth HTTP Basic Auth (username:password) -b, --base-url Base URL to prepend in directory indexes. For reverse proxying. This prefix is - supposed to be pre-stripped when reaching simple-http-server. [default: /] + supposed to be pre-stripped when reaching simpler-http-server. [default: /] --cert TLS/SSL certificate (pkcs#12 format) --certpass TLS/SSL certificate password -c, --compress ... Enable file compression: gzip/deflate diff --git a/src/main.rs b/src/main.rs index 8af1434..23c9d09 100644 --- a/src/main.rs +++ b/src/main.rs @@ -212,7 +212,7 @@ fn main() { .long("base-url") .default_value("/") .takes_value(true) - .help("Base URL to prepend in directory indexes. For reverse proxying. This prefix is supposed to be pre-stripped when reaching simple-http-server.")) + .help("Base URL to prepend in directory indexes. For reverse proxying. This prefix is supposed to be pre-stripped when reaching simpler-http-server.")) .get_matches(); let root = matches @@ -382,7 +382,7 @@ fn main() { let rv = if cert.is_some() { printer .println_err( - "{}: TLS support is not enabled during compilation of simple-http-server", + "{}: TLS support is not enabled during compilation of simpler-http-server", &[("ERROR", &Some(build_spec(Some(Color::Red), true)))], ) .unwrap();