Commit Graph

182 Commits

Author SHA1 Message Date
Jose Quintana
3484e357de docs: v2.33.0 [skip ci] 2024-09-17 23:56:26 +02:00
Jose Quintana
e6a3487586 v2.33.0 2024-09-17 23:24:19 +02:00
Jose Quintana
a3d40b8c2f fix: issues when building SWS without default features (#480)
* fix: issues when building without default features
* fix: windows http1_cancel_recv build issues
2024-09-10 15:28:54 +02:00
Jan Christian Grünhage
d567b4ec1e feat: support for generating man pages and completions (#475)
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>
2024-09-08 21:28:40 +02:00
Jose Quintana
5bdfcd4c88 feat: experimental in-memory files cache with eviction policy support (#328)
Via a new advanced configuration entry.

The feature also supports expiration policies such as Time To Live (TTL) and Time To Idle (TTI).

Admission to a cache is controlled by the Least Frequently Used (LFU) policy and the eviction from a cache is controlled by the Least Recently Used (LRU) policy.

Example:

```toml
[general]

[advanced]

[advanced.memory-cache]
# Maximum capacity entries of the memory cache-store. Default 256
capacity = 256
# Time to live in seconds of a cached file entry. Default 1h
ttl = 3600
# Time to idle in seconds of a cached file entry. Default 5min
tti = 300
# Maximum size in bytes for a file entry to be cached. Default 8MB
max-file-size = 8192
```

Note that this feature requires Rust 1.76.0 or newer.

This feature is **experimental**. However, when stabilized then a cargo feature will be available as well as a proper documentation page.
2024-09-04 00:15:55 +02:00
Jose Quintana
e67e4c4901 docs: v2.32.2 [skip ci] 2024-08-14 00:10:12 +02:00
Jose Quintana
ce50a81d21 docs: v2.32.1 [skip ci] 2024-07-21 00:10:57 +02:00
Jose Quintana
25b1b1c391 docs: improve feature, versioning pages and remove dead links (#460) 2024-07-01 23:59:20 +02:00
Jose Quintana
9afff97acd docs: v2.32.0 [skip ci] 2024-06-19 06:49:32 +02:00
Jose Quintana
eeb88dab51 feat: disable symlinks option via --disable-symlinks (#454)
* feat: disable symlinks option

--disable-symlinks[=<DISABLE_SYMLINKS>]
  Prevent following files or directories if any path name component is
  a symbolic link [env: SERVER_DISABLE_SYMLINKS=] [default: false]
  [possible values: true, false]

* chore: add tests
* docs: feature page [skip ci]
2024-06-11 22:46:50 +02:00
Jose Quintana
91f8ec0675 docs: improve download-and-install.md page (second part) 2024-05-23 00:42:42 +02:00
Jose Quintana
a888397180 docs: improve download-and-install.md page (#450) 2024-05-23 00:19:39 +02:00
Frank
b2911891cd feat: custom install version and directory options for binary installer (#449)
* update installer.sh to support overriding default variables

* add instructions on envs
2024-05-22 08:33:01 +02:00
Jose Quintana
7758525014 docs: v2.31.1 [skip ci] 2024-05-21 01:18:10 +02:00
Jose Quintana
8a9b2fc98f docs: v2.31.0 [skip ci] 2024-05-19 22:49:46 +02:00
Jose Quintana
7cf72e6315 chore: several project config and doc file improvements 2024-05-19 01:03:42 +02:00
Wladimir Palant
9cbf95b7c5 feat: compression level option support (#381)
* Make fastest compression level the default setting

* Use balanced compression levels by default

* Fixed formatting and addressed clippy warning

* Change default zlib compression level to 3

* Updated docs to mention zlib compression

* Fixed setting spelling in docs

* Don't expose CompressionLevel::into_algorithm_level()

* Updated documentation of the compression feature
2024-05-01 06:42:25 +03:00
github-actions
957fe6b9db docs: v2.30.0 [skip ci]
This reverts parrtially commit e30c6aaba6.
2024-04-29 01:40:59 +02:00
github-actions
e30c6aaba6 docs: v2.30.0 [skip ci] 2024-04-29 01:01:21 +02:00
Wladimir Palant
207fa4a108 refactor: move all rewrite handling logic into the rewrites module (#353)
* Move all rewrite handling logic into the rewrites module

* Improve handling of query strings

* Fix display of rewrite/redirect errors, show underlying errors again

* Document rewrites to a different virtual host

---------

Co-authored-by: Jose Quintana <1700322+joseluisq@users.noreply.github.com>
2024-04-22 00:33:17 +02:00
Matthias Schmidt
1c4fad2009 fix: CORS does not work when used with Basic Auth (#343)
* Skipping basic auth check for OPTIONS requests
* Adding authorization header to allowed_headers list
* refactor: improve cors module and update docs feature page

---------

Co-authored-by: Jose Quintana <joseluisquintana20@gmail.com>
2024-04-16 23:26:05 +02:00
David Legrand
90b6032208 docs: add Exherbo Linux install guide (#331) [skip ci] 2024-03-27 14:02:57 +01:00
Jose Quintana
dd138988c4 docs: v2.28.0 [skip ci] 2024-03-09 00:49:34 +01:00
Jose Quintana
668ecfedf7 docs: docker and related examples [skip ci]
including docker compose, docker swarm & traefik, kubernetes, etc
2024-03-08 23:51:51 +01:00
Jose Quintana
9fb21113fd docs: windows firewall rule instructions for windows service feature
[skip ci]
2024-03-05 23:50:54 +01:00
Jose Quintana
2286e452a0 docs: v2.27.0 [skip ci] 2024-02-13 00:20:15 +01:00
Jose Quintana
1a6caa476a feat: add all and experimental Cargo feature flags (#313)
* feat: `all` and `experimental` cargo feature flags
  - the `all` will host all available features (`default`) plus the
    `experimental`.
  - the `experimental` will only hold unstable features like for example
    `metrics` (as of writing)
* chore: enable the `all` cargo feature for freebsd

this feature also fixes #312
2024-02-12 23:19:15 +01:00
Jose Quintana
a3e5050ab6 docs: v2.26.0 [skip ci] 2024-02-11 00:01:08 +01:00
Jose Quintana
6781ec3bc0 v2.26.0 2024-02-10 23:43:25 +01:00
Jose Quintana
fd15914f47 docs: SWS Discord link [skip ci] 2024-02-10 23:33:51 +01:00
Jose Quintana
563367c5af chore: minimum rust version 1.74.0 2024-02-10 21:49:17 +01:00
Jose Quintana
a7dc6ace80 refactor: drop linux ppc64le/s390x from alpine and scratch docker (#309)
The SWS binaries for ppc64le (powerpc64le-unknown-linux-gnu) and
s590x (s390x-unknown-linux-gnu) are dynamically linked so
it does **not** make so much sense to deliver them with either the
Alpine (musl) or the Scratch images (they even do not work properly as
of writing).

So we remove those two from the SWS Alpine and Scratch Docker image
variants to avoid misunderstandings or future issues.

The Debian Docker image should be preferred instead, either linux/ppc64le
or linux/s390x respectively.

This resolves #308
2024-02-06 22:56:11 +01:00
Jose Quintana
289356b8db docs: v2.25.0 [skip ci] 2024-01-23 01:06:39 +01:00
Jose Quintana
3076d089c0 docs: optional host uri support for url redirects feature (#301) 2024-01-20 23:54:06 +01:00
Jose Quintana
dedefc5eeb docs: fix a few page typos 2024-01-20 23:35:07 +01:00
Jose Quintana
8815762f56 docs: v2.24.2 [skip ci] 2023-12-28 18:39:51 +01:00
Jose Quintana
233d080d56 docs: v2.24.1 [skip ci] 2023-11-15 00:19:57 +01:00
Jose Quintana
a987e37548 docs: fix typo in home page [skip ci]
related to #287
2023-11-14 23:22:40 +01:00
Jose Quintana
e4beae6111 docs: v2.24.0 [skip ci] 2023-11-09 01:52:53 +01:00
Jose Quintana
f8e2d3e462 docs: improve new target page information [skip ci] 2023-11-09 01:31:22 +01:00
Jose Quintana
1fa9261823 refactor: load 404/50x error pages content at runtime (#284)
It loads the HTML 404 (`--page404`) and 50x (`--page50x`) error page
content at runtime. This allows changing the content of those HTML
files on demand without restarting the server.

Previously, the error pages were loaded at start-up time (basically
they were static content).

**Some additional improvements:**

- If a relative path is used then it will be resolved under the root directory.
- The default error page values have been changed:
  - `--page50x=./50x.html`
  - `--page404=./404.html`

In case paths are not found then the server defaults to a generic HTML
message (as before).
2023-11-08 23:47:43 +01:00
Jose Quintana
02c6d3e795 feat: windows arm64 target (#283)
- aarch64-pc-windows-msvc
2023-11-05 22:57:31 +01:00
Jose Quintana
ab16187271 refactor: improve server maintenance mode logging (#282) 2023-11-05 07:30:46 +01:00
Jose Quintana
2798725f56 docs: powerpc64le and s390x targets [skip ci] 2023-10-29 22:42:20 +01:00
Jose Quintana
ed68616f0c docs: v2.23.0 [skip ci] 2023-10-15 23:02:05 +02:00
Jose Quintana
9e5049110c feat: maintenance mode support (#272)
maintenance mode support via new options:

--maintenance-mode=false
--maintenance-mode-status=503
--maintenance-mode-file="./my_maintenance.html"
2023-10-12 22:26:52 +02:00
Jose Quintana
efb2c0cd8a Multiple index files support (#267)
* feat: multiple index files support

option: --index-files="a.html, b.htm, etc"
env: SERVER_INDEX_FILES
default value: "index.html"
2023-10-09 03:25:27 +02:00
Jose Quintana
ddbf8811d2 docs: improve page content [skip ci] 2023-10-02 06:47:20 +02:00
Jose Quintana
7a407c6cc2 docs: WebAssembly page and Wasmer Wasix example [skip ci]
https://static-web-server.net/features/webassembly/
2023-09-26 22:55:45 +02:00
Jose Quintana
b70058c6af docs: TrueNAS SCALE installation via TrueCharts [skip ci]
https://truecharts.org/charts/stable/static-web-server/
2023-09-22 17:33:36 +02:00