static-web-server

A cross-platform, high-performance and asynchronous web server for static files-serving. ⚡

APACHE-2.0 License

Downloads
17.2K
Stars
1.2K
Committers
33

Bot releases are visible (Hide)

static-web-server - v2.30.0 Latest Release

Published by github-actions[bot] 6 months ago

This new v2.30.0 release brings security and dependency updates as well as several bug fixes. Overall performance improvements (directory listing particularly), continuous HTTP load testing benchmarks, project refactorings for increased stability, security and correctness as well as several other improvements.

Fixes

  • 6683446 Bugfix/security dependency updates including rustls, tokio, async-compression, regex, chrono, clap and other crates (also 8cfc7ed, a876cd5, 69bfdd4).
  • c04357e Missing custom headers for directory requests (trailing slash). PR #333.
  • 1c4fad2 CORS does not work properly when used with Basic Auth. PR #343 by @ms140569.
  • 528ed08 Accept-Encoding handling does not work correctly if only two compression schemes are available. PR #361 by @palant.
  • c8e39aa Errors due to "unused code" when features are disabled. PR #368 by @palant.
  • 5d66301 Unreserved characters are percent-encoded in directory listing links. PR #371.
  • 114862a Malformed UTF-8 file names are not handled correctly. PR #374 by @palant.

Features

  • 012ef11 Crate: Display platforms-specific documentation on docs.rs.
  • a197f20 CI: Load testing benchmarks comparison for each commit via GitHub Actions. PR #355 by @palant. See benchmarks on CI.

Refactorings

  • a451a93 Improve performance when serving static files. PR #334.
  • e569a71 Reduce some allocations in several modules. PR #337.
  • 183102d Build error when using specific or no Cargo compression features. PR #339.
  • fe6a2a1 Move health endpoint-related code into a separate file. PR #344 by @palant.
  • cc6784a Move metrics endpoint-related code into a separate file. PR #345 by @palant.
  • 76531e6 Move all of Basic authentication logic into basic_auth module. PR #346 by @palant.
  • d44e5a1 Move all redirect handling logic into the redirects module. PR #348 by @palant.
  • e965933 Move most of the CORS-related code into the cors module. PR #349 by @palant.
  • 1246e37 Move most of maintenance mode logic into maintenance_mode module. PR #350 by @palant.
  • 941f692 Move various code related to header handling to the respective modules. PR #351 by @palant.
  • a13f496 Replaced fork of the headers module by an in-tree handler for the Accept-Encoding header. PR #354 by @palant.
  • 207fa4a Move all rewrite handling logic into the rewrites module. PR #353 by @palant.
  • c3c55a4 Prefer querying available cpus using Rust std. PR #358.
  • ddda871 Apply the usual post-processing to error responses for consistency. PR #359 by @palant.
  • cfd1390 Improve performance of directory listings. PR #357 by @palant.
  • 5a4035f Improve recognition of text MIME types for compression. PR #360 by @palant.
  • b66c89e Move all compression-related code into compression and compression_static modules. PR #369 by @palant.
  • 5b5ea98 Use maud templates and serde_json for directory listings. PR #367 by @palant.
  • f311e94 Move all fallback page logic into the corresponding module. PR #372 by @palant.
  • 7d61c91 Move directory listing initialization into the corresponding module. PR #373 by @palant.

Docs

  • 90b6032 Add Exherbo Linux install guide. PR #331 by @davlgd. See docs.
  • f534f00 Fix typo in GitHub bug report template. PR #341 by @palant.

For more details see v2.30.0 milestone and the full changelog v2.28.0...v2.30.0.

static-web-server - v2.28.0

Published by github-actions[bot] 7 months ago

This new v2.28.0 release brings security dependency updates and bug fixes. Cancellation ability to shut down the server gracefully on demand when using the library, Docker examples and Windows Firewall instructions as well as other improvements.

Fixes

  • 769daf1 Bugfix/security dependency updates including mio, ring, http, rustls-pemfile, regex, chrono, clap and other crates (also a97cc77).
  • e031a7d Docker: Debian 12.5 image update.
  • b6444f4 Crate: TryFrom imported redundantly in Rust nightly. PR #318 by @yonas.

Features

  • afd6a87 Crate: Cancellation ability for server::Server::run_server_on_rt and server::Server::run_standalone functions in Linux/BSDs. PR #319 resolves #315 suggested by @hanaTsuk1.

Refactorings

  • a68349c Crate: Add targets to Crate docs.rs metadata.
  • afa8575 Misc: Refactor the static files module and delegate functionality to separated files. PR #329.

Docs

  • 9fb2111 Windows Firewall rule instructions for the Windows service feature. See docs.
  • 668ecfe Docker, Kubernetes, Treafik and related examples. It resolves #323 suggested by @hanscees. See docs.
static-web-server - v2.27.0

Published by github-actions[bot] 8 months ago

This new v2.27.0 release brings a few dependency updates and bug fixes. Two new Cargo feature flags and fixes a regression introduced by the previous release when building SWS from source.

Fixes

  • ec93d6c Bugfix/security dependency updates including chrono, indexmap, thiserror and other crates.

Features

  • 1a6caa4 Crate: New all and experimental Cargo feature flags. PR #313 also fixes #312 reported by @mattfbacon. See docs.
static-web-server - v2.26.0

Published by github-actions[bot] 8 months ago

This new v2.26.0 release brings several dependency security updates and bug fixes. Support for Range requests out of bounds, experimental Tokio Runtime metrics for Prometheus, new Discord server as well as other improvements.

Fixes

  • 80af0aa Bugfix/security dependency updates including tokio, regex, chrono, libc, toml, serde and other crates. Also 1d4f423
  • 5623799 Docker: Alpine 3.18.6 update.

Features

  • 71dd54f Support for Range requests out of bounds. PR #306 resolves #295 suggested by @bjornharrtell.
  • d4427eb Experimental Tokio Runtime metrics for Prometheus via the new --experimental-metrics option (Unix/Linux). PR #306 by @pl4nty.
  • fd15914 New SWS Discord server.

Refactorings

  • a7dc6ac Docker: Drop support for the linux/ppc64le and linux/s390x of the Alpine Scratch images. Prefer the Debian image variant for those targets instead. PR #309 resolves #308 reported by @glehmann.
  • 563367c Minimum Rust stable version 1.74.0.
  • 370d288 Misc: Base fuzz and micro-benchmark testing for static files module. PR #310.

Acknowledgments

Thanks to our new donor @c0m4r for supporting the project.

static-web-server - v2.25.0

Published by github-actions[bot] 9 months ago

This new v2.25.0 release brings several dependency security updates and bug fixes. An optional Host URI support for the URL Redirects feature, a bug fix when capturing a Glob pattern using brace expansion for URL Rewrites/Redirects as well as other improvements.

Fixes

  • 477ed00 Bugfix/security dependency updates including rustls, h2, regex, chrono, libc, async-compression, serde and other crates (also 32e86aa).
  • 42f52e8 Wrong Glob brace expansion capture in URL Rewrites/Redirects. PR #304.
  • 9f2a4f0 Docker: Alpine 3.18.5 update.

Features

  • 8c6ab53 Optional Host URI support for the URL Redirects feature. PR #301.
    This will allow users for example to perform www to non-www redirects or vice versa. See docs.

Refactorings

  • 83e4277 Migrate TLS module to use tokio-rustls 0.25. PR #303.
  • 1bbc703 CI: Cache Rust toolchain and Cargo directories for CI devel workflow. PR #300.
  • 67a2403 CI: Prefer cross precompiled binary on CI devel workflow.
  • ef9876a CI: Prefer cross precompiled binary on CI release workflow.

Docs

  • 3076d08 Optional Host uri support for URL Redirects feature. See docs.
  • dedefc5 Fix a few page typos.
static-web-server - v2.24.2

Published by github-actions[bot] 10 months ago

This new v2.24.2 release brings general dependency security updates, bug fixes and improvements.

Fixes

  • 5554522 Bugfix/security dependency updates including hyper, tokio, rustls/ring, h2, tracing, regex, toml, futures, serde and other crates.
    • Other commit updates: 16f4afd, 76dc853, 12dfb56
  • 8cdb305 Docker: Debian 12.4 update.
  • af203ca Docker: Alpine 3.17.6 update.

Refactorings

  • 96ec477 Consistency when importing several types.
  • ab67bd7 Misc: GitHub issue and pull request template improvements. PR #294. Also a9d509e.
static-web-server - v2.24.1

Published by github-actions[bot] 11 months ago

This new v2.24.1 release brings dependency security updates and bug fixes. In particular, it fixes an issue when executing the previous Windows ARM64 build as well as other minor improvements.

Fixes

  • c0c88f1 Bugfix/security dependency updates including tokio, http, rustls-pemfile, tracing, clap and other crates.
  • f4e9142 Windows ARM64 binary does not execute due to missing DLLs. PR #290.

Refactorings

  • 990bb7c Statically link the C runtime for Windows MSVC x86 (32-bit) build. PR #291.

Docs

  • e99d989 Fix typos in README file. PR #287 by @dynamite-bud (also a987e37).

Misc

  • 3099dba CI: Manual Docker build CI workflow for testing. PR #286.
  • 680323c CI: Manual release build CI workflow for testing. PR #288.
static-web-server - v2.24.0

Published by github-actions[bot] 12 months ago

This new v2.24.0 release brings dependency security updates and bug fixes. It introduces three new targets (PowerPC (PPC64LE), S390x and Windows ARM64). Features like automatic TOML configuration file detection at startup and 404/50x error pages loading at runtime as well as several improvements.

Fixes

  • e767938 Bugfix/security dependency updates including ring, rustls, regex, clap, serde, futures, brotli and other crates (also b0c0775).
  • 4fa09ab CI: cross does not build when using libc 0.2.149+ on NetBSD.

Features

  • e89ce29 Automatic TOML configuration file detection at startup. PR #281. See docs.
  • fd4bfd4 Linux PowerPC (PPC64LE) and S390x targets (also Docker images). PR #159. See docs.
  • 02c6d3e Windows ARM64 target. PR #283. See docs.
  • 1fa9261 Load 404 and 50x error pages at runtime. PR #284 resolves #98 reported by @Dexus.

Refactorings

  • 4de9acd Allowed methods response for OPTIONS file requests. PR #278.
  • d06ad0f Remove some unused TLS configuration APIs and use defaults directly. PR #279.
  • ab16187 Improve the server maintenance mode debug logs. PR #282.

Docs

  • 2798725 Linux PowerPC (PPC64LE) and S390x targets information. See docs.
static-web-server - v2.23.0

Published by github-actions[bot] about 1 year ago

This new v2.23.0 release brings several dependency updates and bug fixes. New features like multiple index files and maintenance mode support, more performance and resource optimizations (~15% less memory usage), a bug fix for the JSON directory listing, documentation for using SWS in WebAssembly and TrueNAS SCALE as well as other improvements.

Fixes

  • 85ea7c4 Bugfix/security dependency updates including tokio, regex, clap, async-compression (zstd, flate2), tracing, serde and other crates (also 27cb09d).
  • 7c5df01 Wrong directory type for empty files in JSON directory listing. PR #271 resolves #270 reported by @carueda.
  • 89d70d0 Docker: Debian 12.2 image update.
  • aeebc6f Installer: Installer script breakage. PR #274 resolves #273 reported by @kzhui125.
  • e3cd810 Crate: Docs links in compression module.

Features

  • efb2c0c Multiple index files support. PR #267 resolves #257 suggested by @moinologics. See docs.
  • 9e50491 Maintenance mode support. PR #272 resolves #268 suggested by @tuxpizza. See docs.

Refactorings

  • d53c252 Optimize buffer size for static file reads (Linux/Unix targets). PR #269.

Docs

  • 7a407c6 WebAssembly page and Wasmer Wasix example. See docs.
  • b70058c TrueNAS SCALE installation via TrueCharts. See docs.
  • ddbf881 Improve content across several pages.

Acknowledgments

Thanks to our new donor @kirillt for supporting the project.

static-web-server - v2.22.1

Published by github-actions[bot] about 1 year ago

This new v2.22.1 release brings several dependency updates and bug fixes. In particular, it fixes an issue when capturing glob groups for URL Rewrites and Redirects.

Fixes

  • 0b5f590 Bugfix/security dependency updates including aho-corasick (regex), clap, syn and other crates.
  • 2e3e49f URL Rewrites and Redirects do not capture glob groups like /dir/{*} correctly. PR #265 resolves #264 reported by @clembu.
static-web-server - v2.22.0

Published by github-actions[bot] about 1 year ago

This new v2.22.0 release brings several dependency updates and bug fixes. It fixes a performance regression leading to better RAM utilization (~28% less) in comparison to the previous releases with a slight req/sec increase, a new Illumos x86_64 target, as well as improved responsiveness of the directory listing HTML page for mobile and desktop screens.

Fixes

  • 232677c Bugfix/security dependency updates including rustls, async-compression, chrono, clap, serde, regex and other crates. Also b2322a9.

Features

  • 2ec408c Illumos x86_64 target. PR #258.

Refactorings

  • 698a244 Prefer optional slice references for several vector data arguments.
  • 257d47f Remove typed headers when appending cache-control.
  • 48d1910 Improve the responsiveness of the directory listing HTML view. PR #260 resolves #259 reported by @anantakrishna.
  • e551d67 Increase MSRV to 1.70.0.
static-web-server - v2.21.1

Published by github-actions[bot] about 1 year ago

This new v2.21.1 release brings several security dependency updates. In particular for serde_derive and rustls-webpki dependencies.

We encourage users to upgrade as soon as possible.

Fixes

  • c6172b4 Security dependency updates including serde_derive, rustls-webpki, h2 and other crates.
    • serde_derive: potential supply chain attack associated with shipping precompiled binaries (silently) serde-rs/serde#2538
    • rustls-webpki: potential CPU denial of service in certificate path building GHSA-fh2r-99q2-6mmg
static-web-server - v2.21.0

Published by github-actions[bot] about 1 year ago

This new v2.21.0 release brings several dependency updates and bug fixes, a new NetBSD x86_64 target, Virtual Hosting support, and other improvements.

Fixes

  • 91d8bf1 Bugfix/security dependency updates including tokio, regex, clap, serde, globset and other crates.
  • 2142053 Docker: Alpine 3.17.5 update.
  • 37a5113 Docker: Debian 12.1 update.

Features

  • 94e050b NetBSD x86_64 target (x86_64-unknown-netbsd).
  • 7baf569 Virtual Hosting support. PR #252 by @mac-chaffee resolves #171 suggested by @kshpytsya. See docs.

Docs

  • 3f63a0b docs: improve several feature pages.
static-web-server - v2.20.2

Published by github-actions[bot] about 1 year ago

This new v2.20.2 release brings several dependency updates and bug fixes. Also, it fixes a regression in Windows introduced by the previous v2.20.1 release.

Fixes

  • bba9083 Bugfix/security dependency updates including jemallocator, rustls, clap, serde, globset and other crates.
  • 8cc073f Unable to initialize logger in Windows. #248 reported by @tripplet.

Refactorings

  • e9d33ca Basic-auth check request function.
static-web-server - v2.20.1

Published by github-actions[bot] about 1 year ago

This new v2.20.1 release brings several dependency updates and bug fixes. In particular, one fix for a regression introduced by the previous v2.20.0 release as well as other improvements.

Fixes

  • 1fe464b Bugfix/security dependency updates including zstd, clap, serde, bcrypt, globset, signal and other crates (also b763b50).
  • 3cf13dc URL Rewrites and Redirects don't work properly without replacements. PR #244 fixes #243 reported by @domi2120.
  • 8da2b69 Alpine 3.17.4.

Refactorings

  • 949c539 Initialize log system at config level.
  • 7fc0e1b Improve start-up server log information.
  • 032aaf3 CI: Post-release script and devel Makefile.
static-web-server - v2.20.0

Published by github-actions[bot] over 1 year ago

This new v2.20.0 release brings several dependency updates and bug fixes, advanced features like Glob pattern replacements for URL Redirects and Rewrites, a new health-check endpoint, GitHub Container Registry (GHCR) Docker images as well as other improvements.

Fixes

  • 9b84786 Bugfix/security dependency updates including tokio, hyper, h2, rustls, clap, serde and other crates (also 9b84786).
  • b8473aa Potential panic when invalid content range.
  • 2331c88 CI: Post-release update script.

Features

  • 4a10635 Docker: GitHub Container Registry (GHCR) Docker images. PR #232 resolves #225 suggested by @jcgruenhage. See docs.
  • 06955e9 Redirect option for URL Rewrites feature. PR #231. See docs.
  • 3a47ef6 Replacements support for URL Rewrites destination. PR #235. See docs.
  • 7c66c5c Replacements support for URL Redirects destination. PR #239. See docs.
  • b42214b Health-check endpoint. PR #238 resolves #237 by @glehmann. See docs.

Refactorings

  • 1bce204 Improve auto index options.
  • b2e4e49 Improve directory listing styling for HTML display.
  • e23a06d Lib: Crate docs metadata.

Docs

  • 506f54e Systemd service example. See docs.
  • eb2887f Nix package and module maintainers (@figsoda, @mac-chaffee). See docs.
  • 031931f GHCR Docker images description. See docs.
  • 21c90db Several documentation improvements.

Acknowledgments

Thanks to our new donor @kirillt for supporting the project.

static-web-server - v2.19.0

Published by github-actions[bot] over 1 year ago

This new v2.19.0 release brings several dependency updates/bug fixes (including minor versions), a new Debian 12 "bookworm" Docker image, more Cargo features for controlling the SWS feature set when building, bug fixes for the SWS crate and one regression for the fallback-page feature, documentation for cross-compiling SWS from source using Zig as a linker as well as other improvements.

Fixes

  • d258803 Bugfix/security dependency updates including clap, async-compression, zstd, tokio-rustls, toml, pin-project, form_urlencoded, percent-encoding and other crates.
  • 3e4bd47 Value is required for fallback-page when passing no CLI or env value. PR #219 fixes #218 reported by @OdyX.
  • 558fd96 Lib: Unresolved/unused imports when building without Cargo features.
  • 911a1c2 Misc: Fix some module typos.
  • b751b40 CI: Wrong release tag for checksums workflow.

Features

  • 3adf75e Docker: Debian 12 "bookworm" Docker image using statically-linked binary (musl libc). See docs.
  • 79a93f6 Lib: directory-listing Cargo feature. PR #220. See docs.
  • a8144d6 Lib: basic-auth Cargo feature. PR #221. See docs.
  • 680c8aa Lib: fallback-page Cargo feature. PR #222. See docs.

Refactorings

  • 986b663 Lib: Enable Crate docsrs config flag.
  • 9e635bd Lib: Improve Cargo docs for some SWS features.
  • a0f92f5 CI: Post-release updates script.

Docs

static-web-server - v2.18.0

Published by github-actions[bot] over 1 year ago

This new v2.18.0 release brings several dependency updates/bug fixes, SWS bug fixes for the security-headers and page-fallback features, the C runtime in Windows x86_64 is now statically linked, the possibility to use CLI boolean flags without explicit values as well as some refactorings and improvements.

Fixes

  • ddfc00b Bugfix/security dependency updates including clap, parking_lot, libc, percent-encoding, form_urlencoded, regex and other crates.
  • cbb21c0 security-headers not enabled by default when using http2 via config file. PR #216 fixes #210 resported by @mac-chaffee.
  • 91519c9 Obsolete X-XSS-Protection header on security-headers (also d5279ff). Reported on #213 by @picchietti.
  • e183ea3 Missing SWS base modules when page-fallback is enabled. Reported on #213 by @picchietti.
    The following SWS modules are now used when page-fallback feature is activated:
    • cors
    • compression
    • cache_control_headers
    • security_headers
    • custom_headers
  • fba6665 CI: Workflow fails to generate proper checksums.

Features

  • 2150c74 Support for CLI boolean flags without explicit values (E.g. static-web-server -d public/ --compression -z). PR #215 resolves #209 suggested by @mac-chaffee.

Refactorings

  • fa0cca5 Statically link the C runtime on Windows MSVC x86_64 to avoid the VCRUNTIME140.dll.
  • a75147e Lib: Rust nightly toolchain for crate docs.
  • 520e66d CI: Increase verbosity of cargo build across pipelines.

Acknowledgments

Thanks to our new donor @picchietti for supporting the project.

static-web-server - v2.17.0

Published by github-actions[bot] over 1 year ago

This new v2.17.0 release brings several dependency updates/bug fixes, ECC private keys support for the tls feature, HTTP to HTTPS redirect support, several Cargo features for controlling the SWS compression and compression-static, dependency migrations like the clap CLI parser and tokio-rustls as well as various refactorings and improvements.

Fixes

  • b685cda Bugfix/security dependency updates including tokio, tracing, chrono, serde, h2, libc, pin-project, windows-sys and other crates.

Features

  • 946b4e5 HTTP to HTTPS redirect support. PR #203 resolves #202 suggested by @micsama. See docs.
  • 0f66443 ECC private keys support for the tls feature. PR #208 resolves #207 suggested by @mac-chaffee. See docs.
  • af77e4a Lib: Cargo features for compression and compression-static. PR #201. See docs.
  • f8fca0a Misc: Include SPDX license identifiers in every source file.
  • a345df3 Misc: Benchmarks 2023-04. See repository.
  • 1894474 CI: Workflow to automate checksums.

Refactorings

  • 4e01de6 Migrate clap CLI parser to v3. PR #211 by @mac-chaffee.
  • e8560a0 Update tokio-rustls to 0.24.
  • 20de5d0 HTTP to HTTPS redirect feature improvements.
  • 647e9b0 Lib: Include missing rustls-pemfile in Cargo tls feature.
  • 53ef76e Lib: Improve Rust docs for Cargo features.
  • 6b81c48 Lib: Simplify http2 Cargo feature.
  • ae17023 CI: Simplify workflow scripts.

Docs

  • d3fa602 HTTP to HTTPS redirect feature page. See docs.
  • 880eaf4 HTTP/2 and TLS feature page improvements. See docs.
  • e0ae5a7 Blocking threads feature page. See docs.
  • c64e3d6 Safe TLS defaults description. See docs.
  • 6876a75 Enable content editing option and revision. See docs.
static-web-server - v2.16.0

Published by github-actions[bot] over 1 year ago

This new v2.16.0 release brings several dependency updates/bug fixes including the Alpine Docker image, a new Android ARM64 target, Zstandard (zstd) auto-compression and pre-compressed files support, static-web-server available as a crate, as well as other additions and improvements.

Fixes

  • 44daf6b Bugfix/security dependency updates including hyper, tokio, futures, serde, h2, libc, windows and other crates. Also (be8ba9b, fff3d4e).
  • 39cfbab Improve error handling when reading file entries on the directory listing module. PR #192 fixes #191 reported by @PlkMarudny.
  • e36a522 Docker: Update Alpine to 3.17.3. PR #199 by @gaby.
  • 9d7de82 CI: Error when installing the latest Rust on FreeBSD.

Features

  • 70db3c9 New static-web-server crate. PR #190 resolves #188 suggested by @da2ce7.
  • d7dd255 New Android ARM64 target support (aarch64-linux-android). PR #194 resolves #163 suggested by @denisidoro.
  • 2bebec7 Zstandard (zstd) auto-compression and pre-compressed files support. PR #197 resolves #193 suggested by @gaby.
  • 910eaae Add Vary header for Accept-Encoding when --compression or --compression-static is enabled.
  • ca5e7f5 CI: Workflow for publishing the static-web-server crate. PR #189 by @da2ce7.
  • 415465c Misc: Binary installer script for Linux/BSDs. See docs.

Refactorings

  • e751bfb Remove needless as_ref() for several paths on static file module.
  • cc1de08 Rename .html auto-suffix files metadata function.
  • 981c388 CI: Runner images and dependency updates.
  • 4a12898 CI: Improve devel/prod pipelines.
  • cf0d618 Misc: Logo and project description.
  • 90ec4b6 Misc: Move the website to static-web-server.net.

Docs

  • 337f652 Describe v1.x end of life (2023-01-06). See static-web-server.net.
  • 85851e9 Zstd compression feature description.
  • 29b3587 Minor README grammatical & readability updates. PR #196 by @dabrd.
  • 32398b4 Update README page links.