Versions in this module Expand all Collapse all v0 v0.0.2 Nov 14, 2023 Changes in this version + const DefaultIdleTimeout + const DefaultReadTimeout + const DefaultShutdownTimeout + const DefaultWriteTimeout + const HSTS_max_age_seconds + const LOCAL_DEV_ALLOC_ID + const LOCAL_DEV_REGION + func BuildInfoAsHtmlFunc(bi BuildInfoer) func() template.HTML + func CanonicalizeHandler(logger *slog.Logger, domainCanonicalizer RedirectFunc, ...) http.Handler + func DontRedirect(*http.Request) (url.URL, int) + func EnvOr(key, defaultVal string) string + func FlyInfoAsHtmlFunc(fi FlyInfoer) func() template.HTML + func GenBase32Etag(b []byte) string + func GetGitInfo() string + func GetNonceOrDefault(ctx context.Context, defaultVal string) string + func GetRequestIdOrDefault(ctx context.Context, defaultVal string) string + func HeaderOr(hdr http.Header, key, defaultVal string) []string + func RecoverPanicHandler(logger *slog.Logger, next http.Handler) http.Handler + func RewriteHandler(logger *slog.Logger, rewrite map[string]string, next http.Handler) http.Handler + func SecurityHeadersHandler(logger *slog.Logger, next http.Handler) http.Handler + func TagRequestWithUniqueIdHandler(logger *slog.Logger, next http.Handler) http.Handler + type BuildInfoer interface + GitRevision func() string + type FlyInfoer interface + FlyAllocID func() string + FlyRegion func() string + type RedirTarget struct + Code int + ToPath string + type RedirectFunc func(*http.Request) (url.URL, int) + func DomainCanonicalizer(logger *slog.Logger, canonFQDN string, secondaryFQDNs []string) RedirectFunc + func PathCanonicalizer(logger *slog.Logger, redirMap map[string]RedirTarget) RedirectFunc + type ServerWithShutdown struct + func NewServerWithShutdown() *ServerWithShutdown + func (s *ServerWithShutdown) Run(logger *slog.Logger, flyRegion string, httpPort int, h http.Handler, ...) error + func (s *ServerWithShutdown) Shutdown() error + type Setting struct + Kind SettingKind + Val int + type SettingKind int + const CfgIdleTimeout + const CfgReadTimeout + const CfgShutdownTimeout + const CfgWriteTimeout + type Static struct + func (s *Static) GetDigestUrlByFilePath(fpath string) (_ string, ok bool) + func (s *Static) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (static *Static) Init(logger *slog.Logger, filesys fs.FS, notFoundFunc http.HandlerFunc) error v0.0.1 Nov 14, 2023