Files
member-console/internal/middleware/compress.go
T
cgalo5758 88db730fcc Add dual licensing and SPDX headers
Introduce a commercial license option alongside AGPL-3.0-only, require a
CLA for contributors, and document the terms in COMMERCIAL.md and
NOTICE. Add a script to stamp SPDX headers on Go files and apply it
across the tree.
2026-09-06 02:29:42 -05:00

22 lines
481 B
Go

// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
// SPDX-FileCopyrightText: 2025-2026 Christian Galo
package middleware
import (
"net/http"
"github.com/CAFxX/httpcompression"
)
// Compress creates a middleware that compresses HTTP responses using default settings
func Compress() Middleware {
return func(next http.Handler) http.Handler {
compress, err := httpcompression.DefaultAdapter()
if err != nil {
panic(err)
}
return compress(next)
}
}