Skip to content

Commit 2096f80

Browse files
committed
docs: update Go version and timeout defaults for v1.0.0
- Bump Go requirement from 1.23+ to 1.26+ in README, USER_GUIDE, CLI docs - Update ReadTimeout/WriteTimeout 30s→10s, IdleTimeout 120s→75s in README DoS table, README config reference table, USER_GUIDE inline config snippet, and both config.toml.example files (root + embedded cmd copy) - Update USER_GUIDE Docker example FROM golang:1.23-alpine to golang:1.26-alpine
1 parent 3f67119 commit 2096f80

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

CLI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static-web version
279279
go install github.com/static-web/server/cmd/static-web@latest
280280
```
281281

282-
Requires Go 1.23+. Installs to `$(go env GOPATH)/bin/static-web`. Add `$(go env GOPATH)/bin` to your `PATH` if not already there.
282+
Requires Go 1.26+. Installs to `$(go env GOPATH)/bin/static-web`. Add `$(go env GOPATH)/bin` to your `PATH` if not already there.
283283

284284
### 2. Homebrew (macOS / Linux)
285285

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ A production-grade, high-performance static web file server written in Go. Zero
2424
## Quick Start
2525

2626
```bash
27-
# Go install (requires Go 1.23+)
27+
# Go install (requires Go 1.26+)
2828
go install github.com/static-web/server/cmd/static-web@latest
2929

3030
# Serve the current directory
@@ -195,8 +195,8 @@ Only `GET`, `HEAD`, and `OPTIONS` are accepted. All other methods (including `TR
195195
| Mitigation | Value |
196196
|------------|-------|
197197
| `ReadHeaderTimeout` | 5 s (Slowloris) |
198-
| `ReadTimeout` | 30 s |
199-
| `WriteTimeout` | 30 s |
198+
| `ReadTimeout` | 10 s |
199+
| `WriteTimeout` | 10 s |
200200
| `MaxHeaderBytes` | 8 KiB |
201201

202202
---
@@ -214,9 +214,9 @@ Copy `config.toml.example` to `config.toml` and edit as needed. The server start
214214
| `tls_cert` | string || Path to TLS certificate (PEM) |
215215
| `tls_key` | string || Path to TLS private key (PEM) |
216216
| `read_header_timeout` | duration | `5s` | Slowloris protection |
217-
| `read_timeout` | duration | `30s` | Full request read deadline |
218-
| `write_timeout` | duration | `30s` | Response write deadline |
219-
| `idle_timeout` | duration | `120s` | Keep-alive idle timeout |
217+
| `read_timeout` | duration | `10s` | Full request read deadline |
218+
| `write_timeout` | duration | `10s` | Response write deadline |
219+
| `idle_timeout` | duration | `75s` | Keep-alive idle timeout |
220220
| `shutdown_timeout` | duration | `15s` | Graceful drain window |
221221

222222
### `[files]`
@@ -358,7 +358,7 @@ make precompress # runs gzip and brotli on all .js/.css/.html/.json/.svg
358358

359359
### Prerequisites
360360

361-
- Go 1.23+
361+
- Go 1.26+
362362
- GNU Make
363363

364364
### Commands

USER_GUIDE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This guide covers everything you need to get `static-web` running in production
3333
### From source
3434

3535
```bash
36-
# requires Go 1.23+
36+
# requires Go 1.26+
3737
git clone https://github.com/static-web/server.git
3838
cd server
3939
make build # produces bin/static-web
@@ -113,9 +113,9 @@ tls_addr = ":8443" # HTTPS listen address (requires tls_cert + tls
113113
tls_cert = "" # path to PEM certificate file
114114
tls_key = "" # path to PEM private key file
115115
read_header_timeout = "5s" # Slowloris protection
116-
read_timeout = "30s"
117-
write_timeout = "30s"
118-
idle_timeout = "120s"
116+
read_timeout = "10s"
117+
write_timeout = "10s"
118+
idle_timeout = "75s"
119119
shutdown_timeout = "15s" # graceful drain window on SIGTERM/SIGINT
120120

121121
[files]
@@ -332,7 +332,7 @@ Multi-stage build — the final image is scratch-based (~7 MB).
332332
# syntax=docker/dockerfile:1
333333

334334
# ── Stage 1: build ──────────────────────────────────────────────────────────
335-
FROM golang:1.23-alpine AS builder
335+
FROM golang:1.26-alpine AS builder
336336

337337
WORKDIR /src
338338
COPY go.mod go.sum ./

cmd/static-web/config.toml.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ tls_key = ""
1818
read_header_timeout = "5s"
1919

2020
# Maximum time to read an HTTP request from the client (headers + body).
21-
read_timeout = "30s"
21+
read_timeout = "10s"
2222

2323
# Maximum time to write an HTTP response to the client.
24-
write_timeout = "30s"
24+
write_timeout = "10s"
2525

2626
# Maximum time an idle keep-alive connection is held open.
27-
idle_timeout = "120s"
27+
idle_timeout = "75s"
2828

2929
# How long to wait for in-flight requests to complete during graceful shutdown.
3030
shutdown_timeout = "15s"

config.toml.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ tls_key = ""
1818
read_header_timeout = "5s"
1919

2020
# Maximum time to read an HTTP request from the client (headers + body).
21-
read_timeout = "30s"
21+
read_timeout = "10s"
2222

2323
# Maximum time to write an HTTP response to the client.
24-
write_timeout = "30s"
24+
write_timeout = "10s"
2525

2626
# Maximum time an idle keep-alive connection is held open.
27-
idle_timeout = "120s"
27+
idle_timeout = "75s"
2828

2929
# How long to wait for in-flight requests to complete during graceful shutdown.
3030
shutdown_timeout = "15s"

0 commit comments

Comments
 (0)