Files
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

21 lines
443 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/rs/cors"
)
// CORS middleware handles Cross-Origin Resource Sharing
func CORS(options cors.Options) Middleware {
// Create a CORS handler with the provided options
c := cors.New(options)
return func(next http.Handler) http.Handler {
return c.Handler(next)
}
}