Skip to content

Commit

Permalink
docs: fix typos (#140) [skip ci]
Browse files Browse the repository at this point in the history
fix typos found via `codespell -L crate`
  • Loading branch information
kianmeng committed Sep 17, 2022
1 parent 5f10771 commit 59a75e6
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/content/configuration/config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ security-headers = true
cors-allow-origins = ""
cors-allow-headers = ""

#### Directoy listing
#### Directory listing
directory-listing = false
directory-listing-order = 6

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/features/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion src/redirects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<Redirects>>,
Expand Down
2 changes: 1 addition & 1 deletion src/rewrites.rs
Original file line number Diff line number Diff line change
@@ -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<Vec<Rewrites>>,
Expand Down
4 changes: 2 additions & 2 deletions src/settings/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub struct General {
pub cors_allow_origins: Option<String>,
pub cors_allow_headers: Option<String>,

// Directoy listing
// Directory listing
pub directory_listing: Option<bool>,
pub directory_listing_order: Option<u8>,

Expand Down Expand Up @@ -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
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/toml/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ http2-tls-key = ""
security-headers = true
cors-allow-origins = ""

#### Directoy listing
#### Directory listing
directory-listing = false

#### Basich Authentication
Expand Down

0 comments on commit 59a75e6

Please sign in to comment.