- BREAKING: End support for unmaintained Windows 7, 8, 8.1 platforms as previously announced on v2.36.1.
- SECURITY (RUSTSEC-2024-0437): Crash due to uncontrolled recursion in protobuf crate was temporarily solved in the previous release. However, this PR applies the dependency patches recently available.
- RESTORED: `experimental` Cargo feature for metrics and in-memory cache.
This PR adds support for controlling ANSI escape codes for colors and other text formatting when logging via a new boolean --log-with-ansi CLI option and its equivalent SERVER_LOG_WITH_ANSI env.
No ANSI by default:
Note that from now on, SWS will be no-ansi by default. If you want colored log output, then use --log-with-ansi.
For example:
```
static-web-server -p 8788 -d ./public/ -g trace -z --log-with-ansi
```
It fixes an issue (previously an ad-hoc and inconsistent behavior) where SWS printed INFO-level messages at startup despite setting up a higher log level. E.g., `WARN` or `ERROR`.
Notice:
For consistency reasons, SWS now won't persistently show server information at startup independently of the log level as it did before. Instead, those info log entries are non-persistent and under the normal `INFO` log level.
For example, to show those logs again then use the `INFO` log level.
$ static-web-server -p 8787 -d public/ -g info
It just automates the post-release updates needed after every release, like documentation and installer script updates, as well as checksum generation.
This change removes the "experimental" Cargo feature from the
resulting static-web-server **binary** temporarily (not the Cargo
feature itself) to prevent shipping the RUSTSEC-2024-0437 security
vulnerability along with SWS binary.
The "experimental" Cargo feature will be restored once the upstream
patch is available.
Old Windows 7, 8, 8.1 patch:
Additionally, it pins zerofrom, zerofrom-derive and litemap
dependencies **temporarily** to be able to build SWS for old Windows
7, 8, 8.1 because newer versions of them require rustc 1.81 or later.
* chore: build and push devel image on master changes via ci workflow (#508) by @mschoettle
* ci: build and push devel image on master
* Temporarily enable devel docker release on pull request
* add build release
* ci: build only amd64 and use devel dockerfiles
* temporarily disable login to docker hub
* fix tag
* add cache for binary
* test release binary
* move binary to the right place
* update action versions
* disable docker hub image
* test tags
* test tags
* test tags
* add permissions to scratch job
* apply feedback
* remove test step
* Address comments
* refactor: prefer job matrix strategy and x86_64-unknown-linux-musl
---------
Co-authored-by: Matthias Schoettle <git@mattsch.com>
* refactor: prevent single wildcards from matching path separators for URL Rewrites
* Fix log output in documentation
BREAKING CHANGE: Up to version 2.33.1 the wildcard `*` was matching the path separator. For example, `/{*}/{*}/` matched `/assets/images/logo/`. In later versions, the default has changed such that `*` does not match the path separator. In contrast, double wildcard (`**`) can match also a path separator.
* Fix anchor links in documentation
* Move strict to mkdocs config
* add mkdocs to CI
---------
Co-authored-by: Jose Quintana <1700322+joseluisq@users.noreply.github.com>
* Enable literal_separator for redirects
This ensures that * does not match the path separator.
* Fix tests
* Update documentation
BREAKING CHANGE: Up to version 2.33.1 the wildcard `*` was matching the path separator. For example, `/{*}/{*}/` matched `/assets/images/logo/`. In later versions, the default has changed such that `*` does not match the path separator. In contrast, double wildcard (`**`) can match also a path separator.
Adds a `log-forwarded-for` option to control if the X-Forwarded-For
header information should be logged.
Also includes a `trusted-proxies`
option to optionally specify from which IPs to accept this header.
Existing uses of log-remote-address will stop logging forwarded-for
IPs after this change.
* chore: update dependencies 26-10-2024
* chore: update dependencies 2024-10-31
* fix: move out handler.rs tests
* chore: pin rust version to 1.81.0 for freebsd on ci due to issues on 1.82.0 for i386 toolchain
via a new `static-web-server generate` subcomand.
* feat: generate man page and completions
* fix: missing Windows imports in binary server entrypoint
* refactor: log completions and man pages generation using server_info
---------
Co-authored-by: Jose Quintana <joseluisquintana20@gmail.com>