Implement HTTP timeout configurations and enhance API documentation

- Added optional HTTP server timeout configurations (`HNHMAP_READ_TIMEOUT`, `HNHMAP_WRITE_TIMEOUT`, `HNHMAP_IDLE_TIMEOUT`) to `.env.example` and updated the server initialization in `main.go` to utilize these settings.
- Enhanced API documentation for the `rebuildZooms` endpoint to clarify its background processing and polling mechanism for status updates.
- Updated `configuration.md` to include new timeout environment variables for better configuration guidance.
- Improved error handling in the client for large request bodies, ensuring appropriate responses for oversized payloads.
This commit is contained in:
2026-03-04 11:59:28 +03:00
parent a3a4c0e896
commit dda35baeca
17 changed files with 396 additions and 73 deletions

View File

@@ -1,5 +1,8 @@
# Backend (Go)
# HNHMAP_PORT=8080
# HNHMAP_READ_TIMEOUT=30s # HTTP read timeout (optional)
# HNHMAP_WRITE_TIMEOUT=60s # HTTP write timeout (optional)
# HNHMAP_IDLE_TIMEOUT=120s # HTTP idle timeout (optional)
# HNHMAP_BOOTSTRAP_PASSWORD= # Set once for first run: login as admin with this password to create the first admin user (then unset or leave empty)
# Grids directory (default: grids); in Docker often /map
# HNHMAP_GRIDS=grids