aboutsummaryrefslogtreecommitdiff
path: root/lib/http/server_options.go
AgeCommit message (Collapse)Author
2026-02-11lib/http: implement server auto shutdown when idleShulhan
In the `ServerOptions`, we add option `ShutdownIdleDuration` when set to non-zero value it will start a timer. When the timer expired, the server will stop accepting new connection and then shutting down. This allow de-activating HTTP server when no connections received after specific duration to reduce the system resources.
2026-02-11lib/http: add BasePath to the ServerOptionsShulhan
The BasePath allow server to serve HTTP from custom prefix, other than "/". Each request that server received will remove the BasePath first from the [http.Request.URL.Path] before passing to the handler. Each redirect that server sent will add the BasePath as the prefix to redirect URL. Any trailing slash in the BasePath will be removed.
2026-02-02lib/http: add field Listener to ServerOptionsShulhan
The field Listener allow user to pass [net.Listener] for accepting new connection using [http.Serve] or [http.ServeTLS].
2026-01-15all: convert license and copyright to use SPDX identifiersShulhan
With help of spdxconv tool [1], we able to bulk update all files license and copyright format to comply with SPDX formats. [1] https://kilabit.info/project/spdxconv/
2024-03-09lib/http: rename files for consistencyShulhan
If the type is in CamelCase the file should be using snake_case.