From 59a75e6aa932ad38cf651aa3a79e0a5b91d28395 Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Sat, 17 Sep 2022 10:13:32 +0800 Subject: [PATCH] docs: fix typos (#140) [skip ci] fix typos found via `codespell -L crate` --- CHANGELOG.md | 4 ++-- docker/alpine/entrypoint.sh | 2 +- docs/content/configuration/config-file.md | 6 +++--- docs/content/features/logging.md | 2 +- src/redirects.rs | 2 +- src/rewrites.rs | 2 +- src/settings/file.rs | 4 ++-- tests/toml/config.toml | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bd1668..3679212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -420,7 +420,7 @@ __Refactorings__ - [2a699e4](https://github.com/joseluisq/static-web-server/commit/2a699e4) Follow symlinks during directory listing, displaying the index page properly for symlinks that points to directories or files. - [b4f1bcc](https://github.com/joseluisq/static-web-server/commit/b4f1bcc) Prefer stabilized `Poll::map_err` on compression stream. -- [55ffd06](https://github.com/joseluisq/static-web-server/commit/55ffd06) Handle potencial panic for 404/50x error page responses. +- [55ffd06](https://github.com/joseluisq/static-web-server/commit/55ffd06) Handle potential panic for 404/50x error page responses. - [920acb2](https://github.com/joseluisq/static-web-server/commit/920acb2) Prefer `to_owned()` for string literals over `to_string()` in some cases. - [c0dca6e](https://github.com/joseluisq/static-web-server/commit/c0dca6e) Improve directory path scanning when directory listing. - [0ed6287](https://github.com/joseluisq/static-web-server/commit/0ed6287) Auto compression error result logging. @@ -462,7 +462,7 @@ __Refactorings__ - [2b2da3a](https://github.com/joseluisq/static-web-server/commit/2b2da3a) `--http2-tls-cert` and `--http2-tls-key` options now require `--http2` enabled. - [6fe04a5](https://github.com/joseluisq/static-web-server/commit/6fe04a5) Update Docker files in order to get the new Linux binary source. -- [77d231c](https://github.com/joseluisq/static-web-server/commit/77d231c) Drop redudant reference on CORS module. +- [77d231c](https://github.com/joseluisq/static-web-server/commit/77d231c) Drop redundant reference on CORS module. - [d5189ec](https://github.com/joseluisq/static-web-server/commit/d5189ec) Drop root arc-path on static files module. ## v2.0.0-beta.4 - 2021-06-02 diff --git a/docker/alpine/entrypoint.sh b/docker/alpine/entrypoint.sh index 4167e74..71caeaf 100755 --- a/docker/alpine/entrypoint.sh +++ b/docker/alpine/entrypoint.sh @@ -2,7 +2,7 @@ set -e -# Check if incomming command contains flags. +# Check if incoming command contains flags. if [ "${1#-}" != "$1" ]; then set -- static-web-server "$@" fi diff --git a/docs/content/configuration/config-file.md b/docs/content/configuration/config-file.md index 4c7ef8d..5e58445 100644 --- a/docs/content/configuration/config-file.md +++ b/docs/content/configuration/config-file.md @@ -41,7 +41,7 @@ security-headers = true cors-allow-origins = "" cors-allow-headers = "" -#### Directoy listing +#### Directory listing directory-listing = false directory-listing-order = 6 @@ -69,7 +69,7 @@ redirect-trailing-slash = true ### Windows Only -#### Windows Service suport. +#### Windows Service support. #### NOTE: this doesn't create a Windows Service per se, #### instead, it just tells SWS to run in a Windows Service context, #### so it's necessary to install the SWS Windows Service first @@ -99,7 +99,7 @@ The TOML `[advanced]` section is intended for more complex features. For example [Custom HTTP Headers](../features/custom-http-headers.md). -### Precendence +### Precedence Whatever config file-based feature option will take precedence over its CLI or ENV equivalent. diff --git a/docs/content/features/logging.md b/docs/content/features/logging.md index 31ccd24..335688d 100644 --- a/docs/content/features/logging.md +++ b/docs/content/features/logging.md @@ -52,7 +52,7 @@ static-web-server -a "0.0.0.0" -p 8080 -d docker/public/ -g info --log-remote-ad When used behind reverse proxy, reported `remote_addr` indicate proxy internal IP address and port, and not client real remote IP. Proxy server can be configured to provide [X-Forwarded-For header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For), containing comma-separated list of IP addresses, starting with *client real remote IP*, and all following intermediate proxies (if any). -When *Remote Address (IP) logging* [is enabled](#log-remote-addresses), and `X-Forwarded-For` header is present and correctly formated, then log entries for requests will contain a `real_remote_ip` section with IP of remote client, **as reported by this header**. +When *Remote Address (IP) logging* [is enabled](#log-remote-addresses), and `X-Forwarded-For` header is present and correctly formatted, then log entries for requests will contain a `real_remote_ip` section with IP of remote client, **as reported by this header**. We can simulate request as from behind reverse proxy with additional intermediate-proxy with following command: diff --git a/src/redirects.rs b/src/redirects.rs index c87d1d1..d51f591 100644 --- a/src/redirects.rs +++ b/src/redirects.rs @@ -3,7 +3,7 @@ use hyper::StatusCode; use crate::settings::Redirects; /// It returns a redirect's destination path and status code if the current request uri -/// matches againt the provided redirect's array. +/// matches against the provided redirect's array. pub fn get_redirection<'a>( uri_path: &'a str, redirects_opts_vec: &'a Option>, diff --git a/src/rewrites.rs b/src/rewrites.rs index a71eee3..b007b36 100644 --- a/src/rewrites.rs +++ b/src/rewrites.rs @@ -1,7 +1,7 @@ use crate::settings::Rewrites; /// It returns a rewrite's destination path if the current request uri -/// matches againt the provided rewrites array. +/// matches against the provided rewrites array. pub fn rewrite_uri_path<'a>( uri_path: &'a str, rewrites_opts_vec: &'a Option>, diff --git a/src/settings/file.rs b/src/settings/file.rs index 0197379..4c7eaa3 100644 --- a/src/settings/file.rs +++ b/src/settings/file.rs @@ -109,7 +109,7 @@ pub struct General { pub cors_allow_origins: Option, pub cors_allow_headers: Option, - // Directoy listing + // Directory listing pub directory_listing: Option, pub directory_listing_order: Option, @@ -164,7 +164,7 @@ impl Settings { for key in unused { println!( - "Warning: unused configuration manifest key \"{}\" or unsuported", + "Warning: unused configuration manifest key \"{}\" or unsupported", key ); } diff --git a/tests/toml/config.toml b/tests/toml/config.toml index e785ac6..1967c1d 100644 --- a/tests/toml/config.toml +++ b/tests/toml/config.toml @@ -27,7 +27,7 @@ http2-tls-key = "" security-headers = true cors-allow-origins = "" -#### Directoy listing +#### Directory listing directory-listing = false #### Basich Authentication -- libgit2 1.7.2