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:
@@ -6,6 +6,9 @@
|
||||
|-----------------|-------------|---------|
|
||||
| `HNHMAP_PORT` | HTTP server port | 8080 |
|
||||
| `-port` | Same (command-line flag) | value of `HNHMAP_PORT` or 8080 |
|
||||
| `HNHMAP_READ_TIMEOUT` | HTTP server read timeout (e.g. `30s`) | 30s |
|
||||
| `HNHMAP_WRITE_TIMEOUT` | HTTP server write timeout (e.g. `60s`) | 60s |
|
||||
| `HNHMAP_IDLE_TIMEOUT` | HTTP server idle timeout (e.g. `120s`) | 120s |
|
||||
| `HNHMAP_BOOTSTRAP_PASSWORD` | Password for initial setup: when no users exist, logging in as `admin` with this password creates the first admin user | — |
|
||||
| `HNHMAP_BASE_URL` | Full application URL for OAuth redirect_uri (e.g. `https://map.example.com`). If not set, derived from `Host` and `X-Forwarded-*` headers | — |
|
||||
| `HNHMAP_OAUTH_GOOGLE_CLIENT_ID` | Google OAuth Client ID | — |
|
||||
|
||||
Reference in New Issue
Block a user